public function PowerMenuPathHandler::configurationForm in Power Menu 7.2
Overrides PowerMenuHandlerInterface::configurationForm
See also
PowerMenuHandlerInterface::configurationForm()
File
- plugins/
menu_handlers/ PowerMenuPathHandler.class.php, line 13
Class
- PowerMenuPathHandler
- Implementation of the interface PowerMenuHandlerInterface.
Code
public function configurationForm() {
$form = array();
$form['note'] = array(
'#markup' => '<p><strong>' . t('Choose the entity bundles for path recognition.') . '</strong></p><p>' . t('For which bundle should the path alias define the menu trail?
The parent path elements are used to find a menu link with the given path. Example:
Path for content \'forum/discussion/myquestion\', lookup for a menu link \'forum/discussion\' and activate this menu link.') . '</p>',
);
$form['power_menu_path']['bundles'] = array(
'#type' => 'fieldset',
'#title' => t('Bundles (Entity type : bundle)'),
'#collapsible' => FALSE,
);
$form['power_menu_path']['bundles']['elements'] = array(
'#type' => 'checkboxes',
'#options' => power_menu_get_entities_and_bundles(),
'#default_value' => variable_get('power_menu_path_bundles', array()),
);
$form['power_menu_path']['steps'] = array(
'#type' => 'fieldset',
'#title' => t('How many steps back'),
'#collapsible' => FALSE,
);
for ($i = 1; $i < 10; $i++) {
$options[$i] = $i;
}
$form['power_menu_path']['steps']['numbers'] = array(
'#type' => 'select',
'#title' => '',
'#default_value' => variable_get('power_menu_path_number', 1),
'#options' => $options,
'#description' => t('The number of path elements to go back to search for a valid menu link.'),
);
return $form;
}