function fieldable_panels_panes_revision_is_lockable in Fieldable Panels Panes (FPP) 7
Determine if an FPP's revision should be locked.
Parameters
object $entity: The FPP object being examined.
Return value
bool Whether the revision can be locked.
2 calls to fieldable_panels_panes_revision_is_lockable()
- fieldable_panels_panes_fieldable_panels_pane_content_type_edit_form_submit in plugins/
content_types/ fieldable_panels_pane.inc - Submit our content type edit form.
- _fieldable_panels_panes_custom_content_type in plugins/
content_types/ fieldable_panels_pane.inc - Return an info array for a specific custom content type.
File
- ./
fieldable_panels_panes.module, line 1618 - Maintains an entity that appears as panel pane content.
Code
function fieldable_panels_panes_revision_is_lockable($entity) {
$lock = variable_get('fpp_revision_locking', 'lock');
// Only non-reusable FPPs will be lockable.
if ($lock == 'lock') {
$revision_context_aware = empty($entity->reusable);
}
else {
$revision_context_aware = FALSE;
}
return $revision_context_aware;
}