public function PanelizerEntityNode::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/ PanelizerEntityNode.class.php, line 56 - Class for the Panelizer node entity plugin.
Class
- PanelizerEntityNode
- Panelizer Entity node 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('node_view');
if (!empty($task['disabled'])) {
drupal_set_message('The node template page is currently not enabled in page manager. You must enable this for Panelizer to be able to panelize nodes.', 'warning');
}
$handler = page_manager_load_task_handler($task, '', 'node_view_panelizer');
if (!empty($handler->disabled)) {
drupal_set_message('The panelizer variant on the node template page is currently not enabled in page manager. You must enable this for Panelizer to be able to panelize nodes.', 'warning');
}
}
}