public function PanelizerEntityDefault::check_page_manager_status in Panelizer 7.3
Check if the necessary Page Manager display is enabled and the appropriate variant has not been disabled.
Return value
boolean Whether or not both the Page Manager display and the variant are enabled.
Overrides PanelizerEntityInterface::check_page_manager_status
2 calls to PanelizerEntityDefault::check_page_manager_status()
- PanelizerEntityDefault::add_bundle_setting_form_submit in plugins/
entity/ PanelizerEntityDefault.class.php - Submit callback for the bundle edit form.
- PanelizerEntityDefault::settings_form in plugins/
entity/ PanelizerEntityDefault.class.php - Add entity specific form to the Panelizer settings form.
File
- plugins/
entity/ PanelizerEntityDefault.class.php, line 882 - Base class for the Panelizer Entity plugin.
Class
- PanelizerEntityDefault
- Base class for the Panelizer Entity plugin.
Code
public function check_page_manager_status() {
$pm_links = array(
'!pm' => l('Page Manager', 'admin/structure/pages'),
'!panels' => l('Panels', 'admin/structure/panels'),
'!task_name' => $this
->get_page_manager_task_name(),
'!entity_type' => $this->entity_type,
);
// The display in Page Manager must be enabled.
if ($this
->is_page_manager_enabled()) {
drupal_set_message(t('Note: "!task_name" display must be enabled in !pm in order for the !entity_type full page display ("Full page override") to work correctly.', $pm_links), 'warning', FALSE);
return FALSE;
}
else {
$task = page_manager_get_task($pm_links['!task_name']);
$handler = page_manager_load_task_handler($task, '', 'term_view_panelizer');
if (!empty($handler->disabled)) {
drupal_set_message(t('The "Panelizer" variant on the "!task_name" display is currently not enabled in !pm. This must be enabled for Panelizer to be able to display !entity_types using the "Full page override" view mode.', $pm_links), 'warning', FALSE);
return FALSE;
}
}
return TRUE;
}