public function SimpleSitemapSyncExtend::extendEntityType in CMS Content Sync 2.0.x
Same name and namespace in other branches
- 8 modules/cms_content_sync_simple_sitemap/src/EventSubscriber/SimpleSitemapSyncExtend.php \Drupal\cms_content_sync_simple_sitemap\EventSubscriber\SimpleSitemapSyncExtend::extendEntityType()
- 2.1.x modules/cms_content_sync_simple_sitemap/src/EventSubscriber/SimpleSitemapSyncExtend.php \Drupal\cms_content_sync_simple_sitemap\EventSubscriber\SimpleSitemapSyncExtend::extendEntityType()
Add the field to the entity type for the simple sitemap configuration.
Parameters
\Drupal\cms_content_sync\Event\BeforeEntityTypeExport $event:
Throws
\Drupal\Component\Plugin\Exception\PluginNotFoundException
File
- modules/
cms_content_sync_simple_sitemap/ src/ EventSubscriber/ SimpleSitemapSyncExtend.php, line 93
Class
- SimpleSitemapSyncExtend
- Event subscriptions for events dispatched by Content Sync.
Namespace
Drupal\cms_content_sync_simple_sitemap\EventSubscriberCode
public function extendEntityType(BeforeEntityTypeExport $event) {
if (!$this
->sitemapSupportsEntityType($event
->getEntityTypeName(), $event
->getBundleName())) {
return;
}
$event
->getDefinition()
->addObjectProperty(self::PROPERTY_NAME, 'Simple sitemap', FALSE);
}