function _fieldable_panels_panes_custom_content_type in Fieldable Panels Panes (FPP) 7
Return an info array for a specific custom content type.
3 calls to _fieldable_panels_panes_custom_content_type()
- fieldable_panels_panes_build_content_type_info in plugins/
content_types/ fieldable_panels_pane.inc - Returns a list of all reusable FPP entities of a given bundle.
- fieldable_panels_panes_fieldable_panels_pane_content_type in plugins/
content_types/ fieldable_panels_pane.inc - Return an individual FPP.
- fieldable_panels_panes_fieldable_panels_pane_content_type_content_type in plugins/
content_types/ fieldable_panels_pane.inc - Callback to return the custom content types with the specified $subtype_name.
File
- plugins/
content_types/ fieldable_panels_pane.inc, line 433 - CTools content type to render a fielded panel pane.
Code
function _fieldable_panels_panes_custom_content_type($entity) {
$info = array(
'title' => _fieldable_panels_panes_admin_title_from_entity($entity),
'description' => check_plain($entity->admin_description),
'category' => $entity->category ? check_plain($entity->category) : t('Miscellaneous'),
'all contexts' => TRUE,
'icon' => 'icon_block_custom.png',
);
// Determine how to handle revision locking.
$revision_context_aware = fieldable_panels_panes_revision_is_lockable($entity);
// If UUID is available, use it.
if (module_exists('uuid') && isset($entity->uuid)) {
if ($revision_context_aware) {
$info['name'] = 'vuuid:' . $entity->vuuid;
}
else {
$info['name'] = 'uuid:' . $entity->uuid;
}
}
else {
if ($revision_context_aware) {
$info['name'] = 'vid:' . $entity->vid;
}
else {
$info['name'] = 'fpid:' . $entity->fpid;
}
}
$info['entity_id'] = $info['name'];
$info['bundle'] = $entity->bundle;
return $info;
}