You are here

public function PanelizerEntityDefault::entity_allows_revisions in Panelizer 7.2

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

Implement the save function for the entity.

Overrides PanelizerEntityInterface::entity_allows_revisions

4 calls to PanelizerEntityDefault::entity_allows_revisions()
PanelizerEntityDefault::page_content in plugins/entity/PanelizerEntityDefault.class.php
PanelizerEntityDefault::page_context in plugins/entity/PanelizerEntityDefault.class.php
PanelizerEntityDefault::page_layout in plugins/entity/PanelizerEntityDefault.class.php
PanelizerEntityDefault::page_settings in plugins/entity/PanelizerEntityDefault.class.php
Switched page callback to give the settings form.
3 methods override PanelizerEntityDefault::entity_allows_revisions()
PanelizerEntityNode::entity_allows_revisions in plugins/entity/PanelizerEntityNode.class.php
Implement the save function for the entity.
PanelizerEntityTaxonomyTerm::entity_allows_revisions in plugins/entity/PanelizerEntityTaxonomyTerm.class.php
Implement the save function for the entity.
PanelizerEntityUser::entity_allows_revisions in plugins/entity/PanelizerEntityUser.class.php
Implement the save function for the entity.

File

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

Class

PanelizerEntityDefault
Base class for the Panelizer Entity plugin.

Code

public function entity_allows_revisions($entity) {
  $retval = array();
  list($entity_id, $revision_id, $bundle) = entity_extract_ids($this->entity_type, $entity);

  // @todo -- why is there node specific stuff here?
  $node_options = variable_get('node_options_' . $bundle, array(
    'status',
    'promote',
  ));
  $retval[0] = in_array('revision', $node_options);
  $retval[1] = user_access('administer nodes');
}