function cms_content_sync_migrate_acquia_content_hub_entity_operation_alter in CMS Content Sync 8
Same name and namespace in other branches
- 2.1.x modules/cms_content_sync_migrate_acquia_content_hub/cms_content_sync_migrate_acquia_content_hub.module \cms_content_sync_migrate_acquia_content_hub_entity_operation_alter()
- 2.0.x modules/cms_content_sync_migrate_acquia_content_hub/cms_content_sync_migrate_acquia_content_hub.module \cms_content_sync_migrate_acquia_content_hub_entity_operation_alter()
Implements hook_entity_operation_alter().
File
- modules/
cms_content_sync_migrate_acquia_content_hub/ cms_content_sync_migrate_acquia_content_hub.module, line 14
Code
function cms_content_sync_migrate_acquia_content_hub_entity_operation_alter(array &$operations, EntityInterface $entity) {
if ($entity instanceof ContentHubFilter) {
$operations['create_pull_flow'] = [
'title' => t('Migrate to Content Sync'),
'weight' => 150,
'url' => Url::fromRoute('cms_content_sync_migrate_acquia_content_hub.migrate_pull', [
'content_hub_filter_id' => $entity
->id(),
]),
];
}
}