class BeforeEntityTypeExport in CMS Content Sync 8
Same name and namespace in other branches
- 2.1.x src/Event/BeforeEntityTypeExport.php \Drupal\cms_content_sync\Event\BeforeEntityTypeExport
- 2.0.x src/Event/BeforeEntityTypeExport.php \Drupal\cms_content_sync\Event\BeforeEntityTypeExport
An entity type is about to be exported. Other modules can use this to add additional fields to the entity type definition, allowing them to process additional information during push and pull (by using BeforeEntityPush and BeforeEntityPull). Check out the cms_content_sync_simple_sitemap submodule to see how it can be used.
Hierarchy
- class \Drupal\cms_content_sync\Event\BeforeEntityTypeExport extends \Symfony\Component\EventDispatcher\Event
Expanded class hierarchy of BeforeEntityTypeExport
3 files declare their use of BeforeEntityTypeExport
- DraggableViewsSyncExtend.php in modules/
cms_content_sync_draggableviews/ src/ EventSubscriber/ DraggableViewsSyncExtend.php - SimpleSitemapSyncExtend.php in modules/
cms_content_sync_simple_sitemap/ src/ EventSubscriber/ SimpleSitemapSyncExtend.php - SyncCoreFlowExport.php in src/
SyncCoreFlowExport.php
File
- src/
Event/ BeforeEntityTypeExport.php, line 15
Namespace
Drupal\cms_content_sync\EventView source
class BeforeEntityTypeExport extends Event {
public const EVENT_NAME = 'cms_content_sync.entity_type.push.before';
/**
* Entity type.
*
* @var string
*/
protected $entity_type_name;
/**
* Bundle.
*
* @var string
*/
protected $bundle_name;
/**
* Entity type definition.
*
* @var \EdgeBox\SyncCore\Interfaces\Configuration\IDefineEntityType
*/
protected $definition;
/**
* Constructs a entity export event.
*
* @param string $entity_type_name
* @param string $bundle_name
* @param \EdgeBox\SyncCore\Interfaces\Configuration\IDefineEntityType $definition
*/
public function __construct($entity_type_name, $bundle_name, &$definition) {
$this->entity_type_name = $entity_type_name;
$this->bundle_name = $bundle_name;
$this->definition =& $definition;
}
/**
* @return string
*/
public function getBundleName() {
return $this->bundle_name;
}
/**
* @return string
*/
public function getEntityTypeName() {
return $this->entity_type_name;
}
/**
* @return \EdgeBox\SyncCore\Interfaces\Configuration\IDefineEntityType
*/
public function getDefinition() {
return $this->definition;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
BeforeEntityTypeExport:: |
protected | property | Bundle. | |
BeforeEntityTypeExport:: |
protected | property | Entity type definition. | |
BeforeEntityTypeExport:: |
protected | property | Entity type. | |
BeforeEntityTypeExport:: |
public | constant | ||
BeforeEntityTypeExport:: |
public | function | ||
BeforeEntityTypeExport:: |
public | function | ||
BeforeEntityTypeExport:: |
public | function | ||
BeforeEntityTypeExport:: |
public | function | Constructs a entity export event. |