interface PanelizerEntityInterface in Panelizer 7.3
Same name and namespace in other branches
- 7.2 plugins/entity/PanelizerEntityDefault.class.php \PanelizerEntityInterface
Interface to describe how PanelizerEntity plugin objects are implemented.
Hierarchy
- interface \PanelizerEntityInterface
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);
/**
* Check if the necessary Page Manager display is enabled and the appropriate
* variant has not been disabled.
*
* @return boolean
* Whether or not both the Page Manager display and the variant are enabled.
*/
public function check_page_manager_status();
/**
* 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);
/**
* Determine the default name for the default object.
*/
public function get_default_display_default_name($bundle, $view_mode = 'page_manager');
/**
* Determine the variable name used to identify the default display for the
* given bundle/view mode combination.
*/
public function get_default_display_variable_name($bundle, $view_mode = 'page_manager');
/**
* Determine the default display name for a given bundle & view mode
* combination.
*/
public function get_default_display_name($bundle, $view_mode = 'page_manager');
/**
* Determine whether a specific default display object exists.
*/
public function default_display_exists($display_name);
/**
* 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($bundle, $view_mode);
/**
* Identify the view modes that are available for use with this entity bundle.
*
* @param string $bundle
* The entity bundle to check. Defaults to '0', which will check for view
* modes that are available by default for all entities.
*
* @return array
* A list of view modes that are available to be panelized.
*/
public function get_available_view_modes($bundle = 0);
/**
* Identify the view modes that are enabled for use with Panelizer.
*
* @param string $bundle
* The entity bundle to check.
*
* @return array
* A list of view modes that are panelized.
*/
public function get_enabled_view_modes($bundle);
/**
* 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.
*/
// @todo this seems to be unused now.
// function get_panelizer_object($key);
/**
* Render a panelized entity.
*/
function render_entity($entity, $view_mode, $langcode = NULL, $args = array(), $address = NULL);
/**
* 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);
/**
* Confirm the view mode to be used, check if a substitute is assigned,
* failover to 'default'.
*
* @param string $view_mode
* The original view mode to be checked.
* @param string $bundle
* The entity bundle being used.
*
* @return string
* The final view mode that will be used.
*/
public function get_view_mode($view_mode, $bundle);
/**
* Obtain the machine name of the Page Manager task.
*
* @return string
* The machine name for the Page Manager task; returns FALSE if this
* entity does not support Page Manager.
*/
public function get_page_manager_task_name();
/**
* Identifies a substitute view mode for a given bundle.
*
* @param string $view_mode
* The original view mode to be checked.
* @param string $bundle
* The entity bundle being checked.
*
* @return string
* The view mode that will be used.
*/
public function get_substitute($view_mode, $bundle);
/**
* Obtain the system path to an entity bundle's display settings page for a
* specific view mode.
*
* @param string $bundle
* @param string $view_mode
*
* @return string
* The system path of the display settings page for this bundle/view mode
* combination.
*/
public function admin_bundle_display_path($bundle, $view_mode);
/**
* 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, the second parameter is whether or not the
* user can control if a revision is created, the third states whether or
* not the revision is created by default.
*/
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();
/**
* Fetch the entity out of a build for hook_entity_view.
*
* @param $build
* The render array that contains the entity.
*/
public function get_entity_view_entity($build);
/**
* Identify whether page manager is enabled for this entity type.
*
* @return bool
*/
public function is_page_manager_enabled();
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
PanelizerEntityInterface:: |
public | function | Determine if the current user has access to the $panelizer. | 1 |
PanelizerEntityInterface:: |
public | function | Obtain the system path to an entity bundle's display settings page for a specific view mode. | 1 |
PanelizerEntityInterface:: |
public | function | Check if the necessary Page Manager display is enabled and the appropriate variant has not been disabled. | 1 |
PanelizerEntityInterface:: |
public | function | Determine whether a specific default display object exists. | 1 |
PanelizerEntityInterface:: |
public | function | Determine if the current user has $op access on the $entity. | 4 |
PanelizerEntityInterface:: |
public | function | Determine if an entity allows revisions and whether or not the current user has access to control that. | 1 |
PanelizerEntityInterface:: |
public | function | Get the name of bundles on the entity. | 1 |
PanelizerEntityInterface:: |
public | function | Get the visible identifier of the identity. | 1 |
PanelizerEntityInterface:: |
public | function | Implement the save function for the entity. | 4 |
PanelizerEntityInterface:: |
public | function | Identify the view modes that are available for use with this entity bundle. | 1 |
PanelizerEntityInterface:: |
public | function | Callback to get the base context for a panelized entity | 1 |
PanelizerEntityInterface:: |
public | function | Fetch an object array of CTools contexts from panelizer information. | 1 |
PanelizerEntityInterface:: |
function | Get a default display for a newly panelized entity. | 1 | |
PanelizerEntityInterface:: |
public | function | Determine the default name for the default object. | 1 |
PanelizerEntityInterface:: |
public | function | Determine the default display name for a given bundle & view mode combination. | 1 |
PanelizerEntityInterface:: |
public | function | Determine the variable name used to identify the default display for the given bundle/view mode combination. | 1 |
PanelizerEntityInterface:: |
public | function | Load the named default panel for the bundle. | 1 |
PanelizerEntityInterface:: |
public | function | Identify the view modes that are enabled for use with Panelizer. | 1 |
PanelizerEntityInterface:: |
public | function | Fetch the entity out of a build for hook_entity_view. | 1 |
PanelizerEntityInterface:: |
public | function | Obtain the machine name of the Page Manager task. | 1 |
PanelizerEntityInterface:: |
public | function | Identifies a substitute view mode for a given bundle. | 1 |
PanelizerEntityInterface:: |
public | function | Confirm the view mode to be used, check if a substitute is assigned, failover to 'default'. | 1 |
PanelizerEntityInterface:: |
public | function | Determine if a bundle has a defalt panel | 1 |
PanelizerEntityInterface:: |
public | function | Determine if a bundle is allowed choices. | 1 |
PanelizerEntityInterface:: |
public | function | 1 | |
PanelizerEntityInterface:: |
public | function | 1 | |
PanelizerEntityInterface:: |
public | function | 1 | |
PanelizerEntityInterface:: |
public | function | 1 | |
PanelizerEntityInterface:: |
public | function | 1 | |
PanelizerEntityInterface:: |
public | function | 1 | |
PanelizerEntityInterface:: |
public | function | 1 | |
PanelizerEntityInterface:: |
public | function | 1 | |
PanelizerEntityInterface:: |
public | function | 1 | |
PanelizerEntityInterface:: |
public | function | 1 | |
PanelizerEntityInterface:: |
public | function | 1 | |
PanelizerEntityInterface:: |
public | function | Initialize the plugin object. | 1 |
PanelizerEntityInterface:: |
public | function | Identify whether page manager is enabled for this entity type. | 1 |
PanelizerEntityInterface:: |
public | function | Determine if a bundle is panelized | 1 |
PanelizerEntityInterface:: |
function | Render a panelized entity. | 1 | |
PanelizerEntityInterface:: |
public | function | Add entity specific form to the Panelizer settings form. | 1 |
PanelizerEntityInterface:: |
public | function | Submit entity specific settings on the Panelizer settings form. | 1 |
PanelizerEntityInterface:: |
public | function | Validate entity specific settings on the Panelizer settings form. | 1 |