class EntityPublishedActionDeriver
Same name in other branches
- 9 core/lib/Drupal/Core/Action/Plugin/Action/Derivative/EntityPublishedActionDeriver.php \Drupal\Core\Action\Plugin\Action\Derivative\EntityPublishedActionDeriver
- 8.9.x core/lib/Drupal/Core/Action/Plugin/Action/Derivative/EntityPublishedActionDeriver.php \Drupal\Core\Action\Plugin\Action\Derivative\EntityPublishedActionDeriver
- 10 core/lib/Drupal/Core/Action/Plugin/Action/Derivative/EntityPublishedActionDeriver.php \Drupal\Core\Action\Plugin\Action\Derivative\EntityPublishedActionDeriver
Provides an action deriver that finds publishable entity types.
Hierarchy
- class \Drupal\Component\Plugin\Derivative\DeriverBase implements \Drupal\Component\Plugin\Derivative\DeriverInterface
- class \Drupal\Core\Action\Plugin\Action\Derivative\EntityActionDeriverBase extends \Drupal\Component\Plugin\Derivative\DeriverBase implements \Drupal\Core\Plugin\Discovery\ContainerDeriverInterface uses \Drupal\Core\StringTranslation\StringTranslationTrait
- class \Drupal\Core\Action\Plugin\Action\Derivative\EntityPublishedActionDeriver extends \Drupal\Core\Action\Plugin\Action\Derivative\EntityActionDeriverBase
- class \Drupal\Core\Action\Plugin\Action\Derivative\EntityActionDeriverBase extends \Drupal\Component\Plugin\Derivative\DeriverBase implements \Drupal\Core\Plugin\Discovery\ContainerDeriverInterface uses \Drupal\Core\StringTranslation\StringTranslationTrait
Expanded class hierarchy of EntityPublishedActionDeriver
See also
\Drupal\Core\Action\Plugin\Action\PublishAction
\Drupal\Core\Action\Plugin\Action\UnpublishAction
3 files declare their use of EntityPublishedActionDeriver
- PublishAction.php in core/
lib/ Drupal/ Core/ Action/ Plugin/ Action/ PublishAction.php - PublishActionTest.php in core/
tests/ Drupal/ KernelTests/ Core/ Action/ PublishActionTest.php - UnpublishAction.php in core/
lib/ Drupal/ Core/ Action/ Plugin/ Action/ UnpublishAction.php
File
-
core/
lib/ Drupal/ Core/ Action/ Plugin/ Action/ Derivative/ EntityPublishedActionDeriver.php, line 14
Namespace
Drupal\Core\Action\Plugin\Action\DerivativeView source
class EntityPublishedActionDeriver extends EntityActionDeriverBase {
/**
* {@inheritdoc}
*/
protected function isApplicable(EntityTypeInterface $entity_type) {
return $entity_type->entityClassImplements(EntityPublishedInterface::class);
}
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overriden Title | Overrides |
---|---|---|---|---|---|
DeriverBase::$derivatives | protected | property | List of derivative definitions. | 1 | |
DeriverBase::getDerivativeDefinition | public | function | Overrides DeriverInterface::getDerivativeDefinition | ||
EntityActionDeriverBase::$entityTypeManager | protected | property | The entity type manager. | ||
EntityActionDeriverBase::create | public static | function | Creates a new class instance. | Overrides ContainerDeriverInterface::create | |
EntityActionDeriverBase::getApplicableEntityTypes | protected | function | Gets a list of applicable entity types. | ||
EntityActionDeriverBase::getDerivativeDefinitions | public | function | Gets the definition of all derivatives of a base plugin. | Overrides DeriverBase::getDerivativeDefinitions | 1 |
EntityActionDeriverBase::__construct | public | function | Constructs a new EntityActionDeriverBase object. | ||
EntityPublishedActionDeriver::isApplicable | protected | function | Indicates whether the deriver can be used for the provided entity type. | Overrides EntityActionDeriverBase::isApplicable | |
StringTranslationTrait::$stringTranslation | protected | property | The string translation service. | 3 | |
StringTranslationTrait::formatPlural | protected | function | Formats a string containing a count of items. | ||
StringTranslationTrait::getNumberOfPlurals | protected | function | Returns the number of plurals supported by a given language. | ||
StringTranslationTrait::getStringTranslation | protected | function | Gets the string translation service. | ||
StringTranslationTrait::setStringTranslation | public | function | Sets the string translation service to use. | 2 | |
StringTranslationTrait::t | protected | function | Translates a string to the current language or to a given language. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.