You are here

class BeforeEntityPush in CMS Content Sync 8

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

An entity is about to be pushed. Other modules can use this to interact with the push, primarily to add, change or remove field values.

Hierarchy

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

Expanded class hierarchy of BeforeEntityPush

3 files declare their use of BeforeEntityPush
DraggableViewsSyncExtend.php in modules/cms_content_sync_draggableviews/src/EventSubscriber/DraggableViewsSyncExtend.php
EntityHandlerBase.php in src/Plugin/EntityHandlerBase.php
SimpleSitemapSyncExtend.php in modules/cms_content_sync_simple_sitemap/src/EventSubscriber/SimpleSitemapSyncExtend.php

File

src/Event/BeforeEntityPush.php, line 14

Namespace

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

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

  /**
   * @var intent
   */
  public $intent;

  /**
   * Constructs a extend entity push event.
   */
  public function __construct(EntityInterface $entity, PushIntent $intent) {
    $this->entity = $entity;
    $this->intent = $intent;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
BeforeEntityPush::$entity public property Entity.
BeforeEntityPush::$intent public property
BeforeEntityPush::EVENT_NAME public constant
BeforeEntityPush::__construct public function Constructs a extend entity push event.