function yoast_seo_form_field_storage_config_edit_form_alter in Real-time SEO for Drupal 8
Same name and namespace in other branches
- 8.2 yoast_seo.module \yoast_seo_form_field_storage_config_edit_form_alter()
Implements hook_form_FORM_ID_alter().
File
- ./
yoast_seo.module, line 55 - Contains yoast_seo.module.
Code
function yoast_seo_form_field_storage_config_edit_form_alter(&$form, FormStateInterface $form_state) {
if ($form_state
->getFormObject()
->getEntity()
->getType() == 'yoast_seo') {
// Hide the cardinality field.
$form['cardinality_container']['#access'] = FALSE;
$form['cardinality_container']['#disabled'] = TRUE;
}
}