You are here

function hook_mefibs_elements_alter in MEFIBS - More exposed forms in blocks 8

Same name and namespace in other branches
  1. 7 mefibs.api.inc \hook_mefibs_elements_alter()

Add additional elements to the accitional exposed form.

Parameters

array $elements: An array with names of form element that should be rendered in the additional filter block.

array $context: An array with addional context information. Supported keys: 'view': The full views object for the view to be rendered. 'display_id': The id of the current display. 'block_id': The id of the current block. The default views block has the id 'default'. 'type': The type of elements that are assembled. Can be 'hide_items' or 'expected_items'.

See also

mefibs_get_expected_items_for_additional_form()

Related topics

1 function implements hook_mefibs_elements_alter()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

mefibs_bef_mefibs_elements_alter in modules/mefibs_bef/mefibs_bef.module
Implements hook_mefibs_elements_alter().
2 invocations of hook_mefibs_elements_alter()
MefibsDisplayExtender::hideExposedFormItems in lib/Drupal/mefibs/Plugin/views/display_extender/MefibsDisplayExtender.php
Hide form elements that should not show up for the given block id.
mefibs_get_expected_items_for_exposed_form_block in ./mefibs.module
Retrieve the elements that should go into the additional form.

File

./mefibs.api.inc, line 33
Sample hooks demonstrating usage in Mefibs.

Code

function hook_mefibs_elements_alter(&$elements, $context) {
  if (in_array('sort_by', $elements['sort'])) {
    $elements['sort'][] = 'sort_bef_combine';
  }
}