1 taxonomy_term_depth_access.inc | public TaxonomyTermDepthLayoutAccess::form(&$form, &$form_state) |
Settings form for configuring this access item.
Overrides LayoutAccess::form
File
- core/
modules/ taxonomy/ layout/ taxonomy_term_depth_access.inc, line 20 - Plugin to provide access control based upon taxonomy term depth.
Class
- TaxonomyTermDepthLayoutAccess
- @file Plugin to provide access control based upon taxonomy term depth.
Code
public function form(&$form, &$form_state) {
parent::form($form, $form_state);
$form['depth'] = array(
'#type' => 'number',
'#title' => t('Depth'),
'#description' => t('Depth is the level of nesting for a taxonomy term. See example below.'),
'#default_value' => $this->settings['depth'],
);
$code = '<code>';
$code .= t('State (1st level, <strong>depth 1</strong>)') . '<br />';
$code .= '- ' . t('City (2nd level, <strong>depth 2</strong>)') . '<br />';
$code .= ' - ' . t('Neighborhood (3rd level, <strong>depth 3</strong>)');
$code .= '</code>';
$form['depth_example'] = array(
'#type' => 'markup',
'#markup' => $code,
);
}