public function EntityHandlerBase::getHandlerSettings in CMS Content Sync 8
Same name and namespace in other branches
- 2.1.x src/Plugin/EntityHandlerBase.php \Drupal\cms_content_sync\Plugin\EntityHandlerBase::getHandlerSettings()
- 2.0.x src/Plugin/EntityHandlerBase.php \Drupal\cms_content_sync\Plugin\EntityHandlerBase::getHandlerSettings()
Get the handler settings.
Return the actual form elements for any additional settings for this handler.
Parameters
array $current_values: The current values that the user set, if any
string $type:: One of 'pull', 'push', 'both'
Return value
array
Overrides EntityHandlerInterface::getHandlerSettings
2 calls to EntityHandlerBase::getHandlerSettings()
- DefaultNodeHandler::getHandlerSettings in src/
Plugin/ cms_content_sync/ entity_handler/ DefaultNodeHandler.php - Get the handler settings.
- DefaultTaxonomyHandler::getHandlerSettings in src/
Plugin/ cms_content_sync/ entity_handler/ DefaultTaxonomyHandler.php - Get the handler settings.
4 methods override EntityHandlerBase::getHandlerSettings()
- DefaultCropHandler::getHandlerSettings in src/
Plugin/ cms_content_sync/ entity_handler/ DefaultCropHandler.php - Get the handler settings.
- DefaultMenuLinkContentHandler::getHandlerSettings in src/
Plugin/ cms_content_sync/ entity_handler/ DefaultMenuLinkContentHandler.php - Get the handler settings.
- DefaultNodeHandler::getHandlerSettings in src/
Plugin/ cms_content_sync/ entity_handler/ DefaultNodeHandler.php - Get the handler settings.
- DefaultTaxonomyHandler::getHandlerSettings in src/
Plugin/ cms_content_sync/ entity_handler/ DefaultTaxonomyHandler.php - Get the handler settings.
File
- src/
Plugin/ EntityHandlerBase.php, line 133
Class
- EntityHandlerBase
- Common base class for entity handler plugins.
Namespace
Drupal\cms_content_sync\PluginCode
public function getHandlerSettings($current_values, $type = 'both') {
$options = [];
$no_menu_link_push = [
'brick',
'field_collection_item',
'menu_link_content',
'paragraph',
];
if (!in_array($this->entityTypeName, $no_menu_link_push) && 'pull' !== $type) {
$options['export_menu_items'] = [
'#type' => 'checkbox',
'#title' => 'Push menu items',
'#default_value' => isset($current_values['export_menu_items']) && 0 === $current_values['export_menu_items'] ? 0 : 1,
];
}
return $options;
}