You are here

interface PanelizerEntityInterface in Panelizer 7.2

Same name and namespace in other branches
  1. 7.3 plugins/entity/PanelizerEntityDefault.class.php \PanelizerEntityInterface

Interface to describe how PanelizerEntity plugin objects are implemented.

Hierarchy

Expanded class hierarchy of PanelizerEntityInterface

All classes that implement PanelizerEntityInterface

File

plugins/entity/PanelizerEntityDefault.class.php, line 10
Base class for the Panelizer Entity plugin.

View source
interface PanelizerEntityInterface {

  /**
   * Initialize the plugin object.
   */
  public function init($plugin);

  // Public Drupal hooks
  public function hook_menu(&$items);
  public function hook_menu_alter(&$items);
  public function hook_form_alter(&$form, &$form_state, $form_id);
  public function hook_permission(&$items);
  public function hook_admin_paths(&$items);
  public function hook_views_data_alter(&$data);

  // Entity specific Drupal hooks
  public function hook_entity_load(&$entities);
  public function hook_entity_insert($entity);
  public function hook_entity_update($entity);
  public function hook_entity_delete($entity);
  public function hook_field_attach_delete_revision($entity);

  /**
   * Add entity specific form to the Panelizer settings form.
   *
   * This is primarily to allow bundle selection per entity type.
   */
  public function settings_form(&$form, &$form_state);

  /**
   * Validate entity specific settings on the Panelizer settings form.
   */
  public function settings_form_validate(&$form, &$form_state);

  /**
   * Submit entity specific settings on the Panelizer settings form.
   */
  public function settings_form_submit(&$form, &$form_state);

  /**
   * Load the named default panel for the bundle.
   */
  public function get_default_panelizer_object($bundle, $name);

  /**
   * Determine if the current user has access to the $panelizer.
   */
  public function access_default_panelizer_object($panelizer);

  /**
   * Determine if a bundle is panelized
   */
  public function is_panelized($bundle);

  /**
   * Determine if a bundle has a defalt panel
   */
  public function has_default_panel($bundle);

  /**
   * Determine if a bundle is allowed choices.
   */
  public function has_panel_choice($bundle);

  /**
   * Get a default display for a newly panelized entity.
   *
   * This is meant to give administrators a starting point when panelizing
   * new entities.
   */
  function get_default_display();

  /**
   * Get a panelizer object for the key.
   *
   * This must be implemented for each entity type, as the default object
   * implements a special case for handling panelizer defaults.
   */
  function get_panelizer_object($key);

  /**
   * Render a panelized entity.
   */
  function render_entity($entity, $args = array());

  /**
   * Fetch an object array of CTools contexts from panelizer information.
   */
  public function get_contexts($panelizer, $entity = NULL);

  /**
   * Callback to get the base context for a panelized entity
   */
  public function get_base_contexts($entity = NULL);

  /**
   * Determine if the current user has $op access on the $entity.
   */
  public function entity_access($op, $entity);

  /**
   * Implement the save function for the entity.
   */
  public function entity_save($entity);

  /**
   * Determine if an entity allows revisions and whether or not the current
   * user has access to control that.
   *
   * @param $entity
   *   The entity in question.
   * @return
   *   An array. The first parameter is a boolean as to whether or not the
   *   entity supports revisions and the second parameter is whether or not
   *   the user can control whether or not a revision is created.
   */
  public function entity_allows_revisions($entity);

  /**
   * Get the visible identifier of the identity.
   *
   * This is overridable because it can be a bit awkward using the
   * default label.
   *
   * @return
   *   A translated, safe string.
   */
  public function entity_identifier($entity);

  /**
   * Get the name of bundles on the entity.
   *
   * Entity API doesn't give us a way to determine this, so the class must
   * do this.
   *
   * @return
   *   A translated, safe string.
   */
  public function entity_bundle_label();

}

Members

Namesort descending Modifiers Type Description Overrides
PanelizerEntityInterface::access_default_panelizer_object public function Determine if the current user has access to the $panelizer. 1
PanelizerEntityInterface::entity_access public function Determine if the current user has $op access on the $entity. 3
PanelizerEntityInterface::entity_allows_revisions public function Determine if an entity allows revisions and whether or not the current user has access to control that. 1
PanelizerEntityInterface::entity_bundle_label public function Get the name of bundles on the entity. 1
PanelizerEntityInterface::entity_identifier public function Get the visible identifier of the identity. 1
PanelizerEntityInterface::entity_save public function Implement the save function for the entity. 3
PanelizerEntityInterface::get_base_contexts public function Callback to get the base context for a panelized entity 1
PanelizerEntityInterface::get_contexts public function Fetch an object array of CTools contexts from panelizer information. 1
PanelizerEntityInterface::get_default_display function Get a default display for a newly panelized entity. 1
PanelizerEntityInterface::get_default_panelizer_object public function Load the named default panel for the bundle. 1
PanelizerEntityInterface::get_panelizer_object function Get a panelizer object for the key. 1
PanelizerEntityInterface::has_default_panel public function Determine if a bundle has a defalt panel 1
PanelizerEntityInterface::has_panel_choice public function Determine if a bundle is allowed choices. 1
PanelizerEntityInterface::hook_admin_paths public function 1
PanelizerEntityInterface::hook_entity_delete public function 1
PanelizerEntityInterface::hook_entity_insert public function 1
PanelizerEntityInterface::hook_entity_load public function 1
PanelizerEntityInterface::hook_entity_update public function 1
PanelizerEntityInterface::hook_field_attach_delete_revision public function 1
PanelizerEntityInterface::hook_form_alter public function 1
PanelizerEntityInterface::hook_menu public function 1
PanelizerEntityInterface::hook_menu_alter public function 1
PanelizerEntityInterface::hook_permission public function 1
PanelizerEntityInterface::hook_views_data_alter public function 1
PanelizerEntityInterface::init public function Initialize the plugin object. 1
PanelizerEntityInterface::is_panelized public function Determine if a bundle is panelized 1
PanelizerEntityInterface::render_entity function Render a panelized entity. 1
PanelizerEntityInterface::settings_form public function Add entity specific form to the Panelizer settings form. 1
PanelizerEntityInterface::settings_form_submit public function Submit entity specific settings on the Panelizer settings form. 1
PanelizerEntityInterface::settings_form_validate public function Validate entity specific settings on the Panelizer settings form. 1