public function PanelizerEntityTaxonomyTerm::settings_form in Panelizer 7.2
Add entity specific form to the Panelizer settings form.
This is primarily to allow bundle selection per entity type.
Overrides PanelizerEntityDefault::settings_form
File
- plugins/
entity/ PanelizerEntityTaxonomyTerm.class.php, line 45 - Class for the Panelizer taxonomy term entity plugin.
Class
- PanelizerEntityTaxonomyTerm
- Panelizer Entity taxonomy term plugin class.
Code
public function settings_form(&$form, &$form_state) {
parent::settings_form($form, $form_state);
$warn = FALSE;
foreach ($this->plugin['bundles'] as $info) {
if (!empty($info['status'])) {
$warn = TRUE;
break;
}
}
if ($warn) {
$task = page_manager_get_task('term_view');
if (!empty($task['disabled'])) {
drupal_set_message('The taxonomy term template page is currently not enabled in page manager. You must enable this for Panelizer to be able to panelize taxonomy terms.', 'warning');
}
$handler = page_manager_load_task_handler($task, '', 'term_view_panelizer');
if (!empty($handler->disabled)) {
drupal_set_message('The panelizer variant on the taxonomy term template page is currently not enabled in page manager. You must enable this for Panelizer to be able to panelize taxonomy terms.', 'warning');
}
}
}