class Mail
Same name and namespace in other branches
- 10 core/lib/Drupal/Core/Mail/Attribute/Mail.php \Drupal\Core\Mail\Attribute\Mail
Defines a Mail attribute for plugin discovery.
Plugin Namespace: Plugin\Mail
For a working example, see \Drupal\Core\Mail\Plugin\Mail\PhpMail
Attributes
#[\Attribute(\Attribute::TARGET_CLASS)]
Hierarchy
- class \Drupal\Component\Plugin\Attribute\AttributeBase extends \Drupal\Component\Plugin\Attribute\AttributeInterface
- class \Drupal\Component\Plugin\Attribute\Plugin implements \Drupal\Component\Plugin\Attribute\AttributeBase
- class \Drupal\Core\Mail\Attribute\Mail implements \Drupal\Component\Plugin\Attribute\Plugin
- class \Drupal\Component\Plugin\Attribute\Plugin implements \Drupal\Component\Plugin\Attribute\AttributeBase
Expanded class hierarchy of Mail
See also
\Drupal\Core\Mail\MailInterface
\Drupal\Core\Mail\MailManager
plugin_api
1 file declares its use of Mail
- SymfonyMailer.php in core/
lib/ Drupal/ Core/ Mail/ Plugin/ Mail/ SymfonyMailer.php
8 string references to 'Mail'
- CommentTokensHooks::tokens in core/
modules/ comment/ src/ Hook/ CommentTokensHooks.php - Implements hook_tokens().
- ContentEntityTest::testUserSource in core/
modules/ migrate/ tests/ src/ Kernel/ Plugin/ source/ ContentEntityTest.php - Tests user source plugin.
- recipe.yml in core/
recipes/ feedback_contact_form/ recipe.yml - core/recipes/feedback_contact_form/recipe.yml
- SystemTokensHooks::tokens in core/
modules/ system/ src/ Hook/ SystemTokensHooks.php - Implements hook_tokens().
- UserAccessTestHooks::entityFieldAccess in core/
modules/ user/ tests/ modules/ user_access_test/ src/ Hook/ UserAccessTestHooks.php - Implements hook_entity_field_access().
File
-
core/
lib/ Drupal/ Core/ Mail/ Attribute/ Mail.php, line 21
Namespace
Drupal\Core\Mail\AttributeView 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(public readonly string $id, public readonly TranslatableMarkup $label, public readonly ?TranslatableMarkup $description = NULL, public readonly ?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 | 7 |
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 | 1 |
Mail::__construct | public | function | Constructs a Mail attribute. | Overrides Plugin::__construct |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.