You are here

class AfterEntityPush in CMS Content Sync 8

Same name and namespace in other branches
  1. 2.1.x src/Event/AfterEntityPush.php \Drupal\cms_content_sync\Event\AfterEntityPush
  2. 2.0.x src/Event/AfterEntityPush.php \Drupal\cms_content_sync\Event\AfterEntityPush

The entity has been pushed successfully. Other modules can use this to react on successful push events.

Hierarchy

  • class \Drupal\cms_content_sync\Event\AfterEntityPush extends \Symfony\Component\EventDispatcher\Event

Expanded class hierarchy of AfterEntityPush

1 file declares its use of AfterEntityPush
PushIntent.php in src/PushIntent.php

File

src/Event/AfterEntityPush.php, line 14

Namespace

Drupal\cms_content_sync\Event
View source
class AfterEntityPush extends Event {
  public const EVENT_NAME = 'cms_content_sync.entity.push.after';

  /**
   * Entity.
   *
   * @var \Drupal\Core\Entity\EntityInterface
   */
  protected $entity;

  /**
   * The pool the entity got pushed to.
   *
   * @var \Drupal\cms_content_sync\Entity\PoolInterface
   */
  protected $pool;

  /**
   * The flow that was used to push the entity.
   *
   * @var \Drupal\cms_content_sync\Entity\FlowInterface
   */
  protected $flow;

  /**
   * The reason the entity got pushed.
   */
  protected $reason;

  /**
   * Action.
   */
  protected $action;

  /**
   * Constructs a entity push event.
   *
   * @param $reason
   * @param $action
   */
  public function __construct(EntityInterface $entity, PoolInterface $pool, FlowInterface $flow, $reason, $action) {
    $this->entity = $entity;
    $this->pool = $pool;
    $this->flow = $flow;
    $this->reason = $reason;
    $this->action = $action;
  }

  /**
   * Get the pushed entity.
   *
   * @return \Drupal\Core\Entity\EntityInterface
   */
  public function getEntity() {
    return $this->entity;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
AfterEntityPush::$action protected property Action.
AfterEntityPush::$entity protected property Entity.
AfterEntityPush::$flow protected property The flow that was used to push the entity.
AfterEntityPush::$pool protected property The pool the entity got pushed to.
AfterEntityPush::$reason protected property The reason the entity got pushed.
AfterEntityPush::EVENT_NAME public constant
AfterEntityPush::getEntity public function Get the pushed entity.
AfterEntityPush::__construct public function Constructs a entity push event.