public function LevelSetting::form in Menu Bean 7
Provides form
_state
Parameters
\Bean $bean:
$form:
Overrides SettingInterface::form
File
- lib/
Drupal/ menu_bean/ Setting/ LevelSetting.php, line 19 - Level Plugin class
Class
Namespace
Drupal\menu_bean\SettingCode
public function form(\Bean $bean, &$form, &$form_state) {
$form['level'] = array(
'#type' => 'select',
'#title' => t('Starting level'),
'#default_value' => $bean->level,
'#options' => array(
'1' => t('1st level (primary)'),
'2' => t('2nd level (secondary)'),
'3' => t('3rd level (tertiary)'),
'4' => t('4th level'),
'5' => t('5th level'),
'6' => t('6th level'),
'7' => t('7th level'),
'8' => t('8th level'),
'9' => t('9th level'),
),
'#description' => t('Blocks that start with the 1st level will always be visible. Blocks that start with the 2nd level or deeper will only be visible when the trail to the active menu item is in the block’s tree.'),
);
return $form;
}