Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Mail.php

class Mail

Same name in this branch
  1. 11.1.x core/lib/Drupal/Core/Annotation/Mail.php \Drupal\Core\Annotation\Mail

Defines a Mail attribute for plugin discovery.

Plugin Namespace: Plugin\Mail

For a working example, see \Drupal\Core\Mail\Plugin\Mail\PhpMail

Hierarchy

  • class \Drupal\Component\Plugin\Attribute\AttributeBase implements \Drupal\Component\Plugin\Attribute\AttributeInterface
    • class \Drupal\Component\Plugin\Attribute\Plugin extends \Drupal\Component\Plugin\Attribute\AttributeBase
      • class \Drupal\Core\Mail\Attribute\Mail extends \Drupal\Component\Plugin\Attribute\Plugin

Expanded class hierarchy of Mail

See also

\Drupal\Core\Mail\MailInterface

\Drupal\Core\Mail\MailManager

Plugin API

4 files declare their use of Mail
MailManager.php in core/lib/Drupal/Core/Mail/MailManager.php
PhpMail.php in core/lib/Drupal/Core/Mail/Plugin/Mail/PhpMail.php
SymfonyMailer.php in core/lib/Drupal/Core/Mail/Plugin/Mail/SymfonyMailer.php
TestMailCollector.php in core/lib/Drupal/Core/Mail/Plugin/Mail/TestMailCollector.php
31 string references to 'Mail'
AccountForm::flagViolations in core/modules/user/src/AccountForm.php
Flags violations for the current form.
AccountForm::form in core/modules/user/src/AccountForm.php
Gets the actual form array to be built.
AccountForm::getEditedFieldNames in core/modules/user/src/AccountForm.php
Gets the names of all fields edited in the form.
AccountSettingsForm::buildForm in core/modules/user/src/AccountSettingsForm.php
Form constructor.
Comment::preSave in core/modules/comment/src/Entity/Comment.php
Acts on an entity before the presave hook is invoked.

... See full list

File

core/lib/Drupal/Core/Mail/Attribute/Mail.php, line 21

Namespace

Drupal\Core\Mail\Attribute
View source
class Mail extends Plugin {
    
    /**
     * Constructs a Mail attribute.
     *
     * @param string $id
     *   The plugin ID.
     * @param \Drupal\Core\StringTranslation\TranslatableMarkup $label
     *   The label of the plugin.
     * @param \Drupal\Core\StringTranslation\TranslatableMarkup|null $description
     *   (optional) A description of the plugin.
     * @param class-string|null $deriver
     *   (optional) The deriver class.
     */
    public function __construct(string $id, TranslatableMarkup $label, ?TranslatableMarkup $description = NULL, ?string $deriver = NULL) {
    }

}

Members

Title Sort descending Modifiers Object type Summary Overriden Title Overrides
AttributeBase::$class protected property The class used for this attribute class.
AttributeBase::$provider protected property The provider of the attribute class.
AttributeBase::get public function Gets the value of an attribute. Overrides AttributeInterface::get 6
AttributeBase::getClass public function Gets the class of the attribute class. Overrides AttributeInterface::getClass 1
AttributeBase::getId public function Gets the unique ID for this attribute class. Overrides AttributeInterface::getId
AttributeBase::getProvider public function Gets the name of the provider of the attribute class. Overrides AttributeInterface::getProvider
AttributeBase::setClass public function Sets the class of the attributed class. Overrides AttributeInterface::setClass 1
AttributeBase::setProvider public function Sets the name of the provider of the attribute class. Overrides AttributeInterface::setProvider
Mail::__construct public function Constructs a Mail attribute. Overrides Plugin::__construct

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal