function cms_content_sync_field_widget_form_alter in CMS Content Sync 8
Same name and namespace in other branches
- 2.1.x cms_content_sync.module \cms_content_sync_field_widget_form_alter()
- 2.0.x cms_content_sync.module \cms_content_sync_field_widget_form_alter()
Add additional entity status fields to paragraph items.
File
- ./
cms_content_sync.module, line 563 - Module file for cms_content_sync.
Code
function cms_content_sync_field_widget_form_alter(&$element, FormStateInterface $form_state, $context) {
if (!_cms_content_sync_is_installed()) {
return;
}
$field_types = $context['widget']
->getPluginDefinition()['field_types'];
if (isset($field_types)) {
if (in_array('entity_reference_revisions', $field_types)) {
_cms_content_sync_paragraphs_push_settings_form($element, $form_state, $context);
}
}
}