public function SearchApiAlterAddHierarchy::configurationForm in Search API 7
Implements SearchApiAlterCallbackInterface::configurationForm().
Overrides SearchApiAbstractAlterCallback::configurationForm
File
- includes/
callback_add_hierarchy.inc, line 34 - Contains SearchApiAlterAddHierarchy.
Class
- SearchApiAlterAddHierarchy
- Adds all ancestors for hierarchical fields.
Code
public function configurationForm() {
$options = $this
->getHierarchicalFields();
$this->options += array(
'fields' => array(),
);
$form['fields'] = array(
'#title' => t('Hierarchical fields'),
'#description' => t('Select the fields which should be supplemented with their ancestors. ' . 'Each field is listed along with its children of the same type. ' . 'When selecting several child properties of a field, all those properties will be recursively added to that field. ' . 'Please note that you should de-select all fields before disabling this data alteration.'),
'#type' => 'select',
'#multiple' => TRUE,
'#size' => min(6, count($options, COUNT_RECURSIVE)),
'#options' => $options,
'#default_value' => $this->options['fields'],
);
return $form;
}