You are here

public function PanelizerEntityFile::settings_form in File Entity (fieldable files) 7.2

Same name and namespace in other branches
  1. 7.3 plugins/entity/PanelizerEntityFile.class.php \PanelizerEntityFile::settings_form()

File

plugins/entity/PanelizerEntityFile.class.php, line 36
Class for the Panelizer file entity plugin.

Class

PanelizerEntityFile
Panelizer Entity file 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('file_view');
    if (!empty($task['disabled'])) {
      drupal_set_message('The file template page is currently not enabled in page manager. You must enable this for Panelizer to be able to panelize files.', 'warning');
    }
    $handler = page_manager_load_task_handler($task, '', 'file_view_panelizer');
    if (!empty($handler->disabled)) {
      drupal_set_message('The panelizer variant on the file template page is currently not enabled in page manager. You must enable this for Panelizer to be able to panelize files.', 'warning');
    }
  }
}