You are here

public function PanelizerEntityUser::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/PanelizerEntityUser.class.php, line 46
Class for the Panelizer taxonomy term entity plugin.

Class

PanelizerEntityUser
Panelizer Entity user plugin class.

Code

public function settings_form(&$form, &$form_state) {
  parent::settings_form($form, $form_state);
  if (!empty($this->plugin['bundles']['user'])) {
    $task = page_manager_get_task('user_view');
    if (!empty($task['disabled'])) {
      drupal_set_message('The user template page is currently not enabled in page manager. You must enable this for Panelizer to be able to panelize users.', 'warning');
    }
    $handler = page_manager_load_task_handler($task, '', 'user_view_panelizer');
    if (!empty($handler->disabled)) {
      drupal_set_message('The panelizer variant on the user template page is currently not enabled in page manager. You must enable this for Panelizer to be able to panelize users.', 'warning');
    }
  }
}