function search_api_exclude_form_node_form_builder in Search API exclude 8
Entity builder for the node form with search_api_exclude options.
See also
search_api_exclude_form_node_form_alter()
1 string reference to 'search_api_exclude_form_node_form_builder'
- search_api_exclude_form_node_form_alter in ./
search_api_exclude.module - Implements hook_form_BASE_FORM_ID_alter(). +
File
- ./
search_api_exclude.module, line 50 - Allows users to exclude specific nodes from indexing by Search API.
Code
function search_api_exclude_form_node_form_builder($entity_type, EntityInterface $entity, array $form, FormStateInterface $form_state) {
$entity
->set('sae_exclude', $form_state
->getValue([
'search_api_exclude',
'exclude',
]));
}