You are here

function _fieldable_panels_panes_default_content_type in Fieldable Panels Panes (FPP) 7

Provide the default content types.

These are all visible in the UI as the content types that allow a user to add new panel pane entities that will then be stored in the database.

2 calls to _fieldable_panels_panes_default_content_type()
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.
fieldable_panels_panes_fieldable_panels_pane_content_type_content_types in plugins/content_types/fieldable_panels_pane.inc
Callback to return all custom content types available.

File

plugins/content_types/fieldable_panels_pane.inc, line 408
CTools content type to render a fielded panel pane.

Code

function _fieldable_panels_panes_default_content_type() {
  $types = array();
  $entity_info = entity_get_info('fieldable_panels_pane');
  foreach ($entity_info['bundles'] as $bundle => $info) {
    $types[$bundle] = array(
      'name' => $bundle,
      'title' => $info['label'],
      'category' => !empty($info['pane category']) ? $info['pane category'] : t('Fielded panes'),
      'top level' => !empty($info['pane top level']) ? $info['pane top level'] : FALSE,
      'icon' => !empty($info['pane icon']) ? $info['pane icon'] : NULL,
      'description' => !empty($info['description']) ? t($info['description']) : t('Create a new custom entity.'),
      'all contexts' => TRUE,
      'bundle' => $bundle,
      'create content access' => 'fieldable_panels_panes_content_type_create_access',
    );
  }
  return $types;
}