Loading modules/base/eca_base.module +4 −0 Original line number Diff line number Diff line Loading @@ -2,12 +2,16 @@ /** * @file * ECA Base submodule. */ use Drupal\eca_base\HookHandler; /** * Helper method return hook handler service. * * @return \Drupal\eca_base\HookHandler * The hook handler service. */ function _eca_base_hook_handler(): HookHandler { return \Drupal::service('eca_base.hook_handler'); Loading modules/base/src/Commands/EcaBaseCommands.php +8 −3 Original line number Diff line number Diff line Loading @@ -13,12 +13,17 @@ use Symfony\Component\EventDispatcher\EventDispatcherInterface; class EcaBaseCommands extends DrushCommands { /** * Event dispatcher. * * @var \Symfony\Component\EventDispatcher\EventDispatcherInterface */ protected EventDispatcherInterface $eventDispatcher; /** * EcaBaseCommand constructor. * * @param \Symfony\Component\EventDispatcher\EventDispatcherInterface $eventDispatcher * The event dispatcher. */ public function __construct(EventDispatcherInterface $eventDispatcher) { parent::__construct(); Loading @@ -26,14 +31,14 @@ class EcaBaseCommands extends DrushCommands { } /** * Trigger custom event with given event ID. * * @usage eca:trigger:custom_event * Trigger custom event with given event ID. * * @param string $id * The id of the custom event to be triggered. * * @usage eca:trigger:custom_event * Trigger custom event with given event ID. * * @command eca:trigger:custom_event */ public function triggerCustomEvent(string $id): void { Loading modules/base/src/Event/CronEvent.php +6 −5 Original line number Diff line number Diff line Loading @@ -6,23 +6,24 @@ use Cron\CronExpression; use Drupal\Component\EventDispatcher\Event; use Drupal\eca\EcaState; use Drupal\eca\Event\ConditionalApplianceInterface; use Drupal\eca\Event\ConfigurableEventInterface; /** * Class CronEvent. * Provides a cron event. * * @package Drupal\eca_base\Event */ class CronEvent extends Event implements ConditionalApplianceInterface { class CronEvent extends Event implements ConditionalApplianceInterface, ConfigurableEventInterface { /** * ECA state service. * * @var \Drupal\eca\EcaState */ protected EcaState $store; /** * Provides field specifications for the modeller. * * @return string[] * {@inheritdoc} */ public static function fields(): array { return [ Loading modules/base/src/Event/CustomEvent.php +4 −3 Original line number Diff line number Diff line Loading @@ -4,15 +4,16 @@ namespace Drupal\eca_base\Event; use Drupal\Component\EventDispatcher\Event; use Drupal\eca\Event\ConditionalApplianceInterface; use Drupal\eca\Event\ConfigurableEventInterface; use Drupal\eca\Event\TokenReceiverInterface; use Drupal\eca\Event\TokenReceiverTrait; /** * Class CustomEvent. * Provides a custom event. * * @package Drupal\eca_base\Event */ class CustomEvent extends Event implements ConditionalApplianceInterface, TokenReceiverInterface { class CustomEvent extends Event implements ConditionalApplianceInterface, ConfigurableEventInterface, TokenReceiverInterface { use TokenReceiverTrait; Loading Loading @@ -48,7 +49,7 @@ class CustomEvent extends Event implements ConditionalApplianceInterface, TokenR } /** * @return string[] * {@inheritdoc} */ public static function fields(): array { return [ Loading modules/base/src/Plugin/ECA/Event/BaseEventDeriver.php +1 −1 Original line number Diff line number Diff line Loading @@ -5,7 +5,7 @@ namespace Drupal\eca_base\Plugin\ECA\Event; use Drupal\eca\Plugin\ECA\Event\EventDeriverBase; /** * * Deriver for ECA Base event plugins. */ class BaseEventDeriver extends EventDeriverBase { Loading Loading
modules/base/eca_base.module +4 −0 Original line number Diff line number Diff line Loading @@ -2,12 +2,16 @@ /** * @file * ECA Base submodule. */ use Drupal\eca_base\HookHandler; /** * Helper method return hook handler service. * * @return \Drupal\eca_base\HookHandler * The hook handler service. */ function _eca_base_hook_handler(): HookHandler { return \Drupal::service('eca_base.hook_handler'); Loading
modules/base/src/Commands/EcaBaseCommands.php +8 −3 Original line number Diff line number Diff line Loading @@ -13,12 +13,17 @@ use Symfony\Component\EventDispatcher\EventDispatcherInterface; class EcaBaseCommands extends DrushCommands { /** * Event dispatcher. * * @var \Symfony\Component\EventDispatcher\EventDispatcherInterface */ protected EventDispatcherInterface $eventDispatcher; /** * EcaBaseCommand constructor. * * @param \Symfony\Component\EventDispatcher\EventDispatcherInterface $eventDispatcher * The event dispatcher. */ public function __construct(EventDispatcherInterface $eventDispatcher) { parent::__construct(); Loading @@ -26,14 +31,14 @@ class EcaBaseCommands extends DrushCommands { } /** * Trigger custom event with given event ID. * * @usage eca:trigger:custom_event * Trigger custom event with given event ID. * * @param string $id * The id of the custom event to be triggered. * * @usage eca:trigger:custom_event * Trigger custom event with given event ID. * * @command eca:trigger:custom_event */ public function triggerCustomEvent(string $id): void { Loading
modules/base/src/Event/CronEvent.php +6 −5 Original line number Diff line number Diff line Loading @@ -6,23 +6,24 @@ use Cron\CronExpression; use Drupal\Component\EventDispatcher\Event; use Drupal\eca\EcaState; use Drupal\eca\Event\ConditionalApplianceInterface; use Drupal\eca\Event\ConfigurableEventInterface; /** * Class CronEvent. * Provides a cron event. * * @package Drupal\eca_base\Event */ class CronEvent extends Event implements ConditionalApplianceInterface { class CronEvent extends Event implements ConditionalApplianceInterface, ConfigurableEventInterface { /** * ECA state service. * * @var \Drupal\eca\EcaState */ protected EcaState $store; /** * Provides field specifications for the modeller. * * @return string[] * {@inheritdoc} */ public static function fields(): array { return [ Loading
modules/base/src/Event/CustomEvent.php +4 −3 Original line number Diff line number Diff line Loading @@ -4,15 +4,16 @@ namespace Drupal\eca_base\Event; use Drupal\Component\EventDispatcher\Event; use Drupal\eca\Event\ConditionalApplianceInterface; use Drupal\eca\Event\ConfigurableEventInterface; use Drupal\eca\Event\TokenReceiverInterface; use Drupal\eca\Event\TokenReceiverTrait; /** * Class CustomEvent. * Provides a custom event. * * @package Drupal\eca_base\Event */ class CustomEvent extends Event implements ConditionalApplianceInterface, TokenReceiverInterface { class CustomEvent extends Event implements ConditionalApplianceInterface, ConfigurableEventInterface, TokenReceiverInterface { use TokenReceiverTrait; Loading Loading @@ -48,7 +49,7 @@ class CustomEvent extends Event implements ConditionalApplianceInterface, TokenR } /** * @return string[] * {@inheritdoc} */ public static function fields(): array { return [ Loading
modules/base/src/Plugin/ECA/Event/BaseEventDeriver.php +1 −1 Original line number Diff line number Diff line Loading @@ -5,7 +5,7 @@ namespace Drupal\eca_base\Plugin\ECA\Event; use Drupal\eca\Plugin\ECA\Event\EventDeriverBase; /** * * Deriver for ECA Base event plugins. */ class BaseEventDeriver extends EventDeriverBase { Loading