You are here

function panopoly_widgets_entity_info_alter in Panopoly Widgets 7

Implementation of hook_entity_info_alter()

File

./panopoly_widgets.module, line 378

Code

function panopoly_widgets_entity_info_alter(&$entity_info) {

  // Quick links
  $entity_info['fieldable_panels_pane']['bundles']['quick_links'] = array(
    'label' => t('Add links'),
    'description' => t('Add links'),
    'pane category' => t('Custom'),
    'pane top level' => TRUE,
    'pane icon' => drupal_get_path('module', 'panopoly_widgets') . '/images/icon_link.png',
    'admin' => array(
      'path' => 'admin/structure/fieldable-panels-panes/%fieldable_panels_panes_type',
      'bundle argument' => 3,
      'real path' => 'admin/structure/fieldable-panels-panes/quick-links',
      'access arguments' => array(
        'administer fieldable panels panes',
      ),
    ),
  );

  // Basic file
  $entity_info['fieldable_panels_pane']['bundles']['basic_file'] = array(
    'label' => t('Add file'),
    'description' => t('Add file'),
    'pane category' => t('Custom'),
    'pane top level' => TRUE,
    'pane icon' => drupal_get_path('module', 'panopoly_widgets') . '/images/icon_file.png',
    'admin' => array(
      'path' => 'admin/structure/fieldable-panels-panes/%fieldable_panels_panes_type',
      'bundle argument' => 3,
      'real path' => 'admin/structure/fieldable-panels-panes/basic-file',
      'access arguments' => array(
        'administer fieldable panels panes',
      ),
    ),
  );

  // Basic Image
  $entity_info['fieldable_panels_pane']['bundles']['image'] = array(
    'label' => t('Add image'),
    'description' => t('Add image'),
    'pane category' => t('Custom'),
    'pane top level' => TRUE,
    'pane icon' => drupal_get_path('module', 'panopoly_widgets') . '/images/icon_image.png',
    'admin' => array(
      'path' => 'admin/structure/fieldable-panels-panes/%fieldable_panels_panes_type',
      'bundle argument' => 3,
      'real path' => 'admin/structure/fieldable-panels-panes/image',
      'access arguments' => array(
        'administer fieldable panels panes',
      ),
    ),
  );

  // Basic text
  $entity_info['fieldable_panels_pane']['bundles']['text'] = array(
    'label' => t('Add text'),
    'description' => t('Add text'),
    'pane category' => t('Custom'),
    'pane top level' => TRUE,
    'pane icon' => drupal_get_path('module', 'panopoly_widgets') . '/images/icon_text.png',
    'admin' => array(
      'path' => 'admin/structure/fieldable-panels-panes/%fieldable_panels_panes_type',
      'bundle argument' => 3,
      'real path' => 'admin/structure/fieldable-panels-panes/text',
      'access arguments' => array(
        'administer fieldable panels panes',
      ),
    ),
  );

  // Basic Map
  $entity_info['fieldable_panels_pane']['bundles']['map'] = array(
    'label' => t('Add map'),
    'description' => t('Add map'),
    'pane category' => t('Custom'),
    'pane top level' => TRUE,
    'pane icon' => drupal_get_path('module', 'panopoly_widgets') . '/images/icon_map.png',
    'admin' => array(
      'path' => 'admin/structure/fieldable-panels-panes/%fieldable_panels_panes_type',
      'bundle argument' => 3,
      'real path' => 'admin/structure/fieldable-panels-panes/map',
      'access arguments' => array(
        'administer fieldable panels panes',
      ),
    ),
  );

  // Basic table
  $entity_info['fieldable_panels_pane']['bundles']['table'] = array(
    'label' => t('Add table'),
    'description' => t('Add table'),
    'pane category' => t('Custom'),
    'pane top level' => TRUE,
    'pane icon' => drupal_get_path('module', 'panopoly_widgets') . '/images/icon_table.png',
    'admin' => array(
      'path' => 'admin/structure/fieldable-panels-panes/%fieldable_panels_panes_type',
      'bundle argument' => 3,
      'real path' => 'admin/structure/fieldable-panels-panes/table',
      'access arguments' => array(
        'administer fieldable panels panes',
      ),
    ),
  );

  // Basic video
  $entity_info['fieldable_panels_pane']['bundles']['video'] = array(
    'label' => t('Add video'),
    'description' => t('Add video'),
    'pane category' => t('Custom'),
    'pane top level' => TRUE,
    'pane icon' => drupal_get_path('module', 'panopoly_widgets') . '/images/icon_video.png',
    'admin' => array(
      'path' => 'admin/structure/fieldable-panels-panes/%fieldable_panels_panes_type',
      'bundle argument' => 3,
      'real path' => 'admin/structure/fieldable-panels-panes/video',
      'access arguments' => array(
        'administer fieldable panels panes',
      ),
    ),
  );

  // Spotlight
  $entity_info['fieldable_panels_pane']['bundles']['spotlight'] = array(
    'label' => t('Add spotlight'),
    'description' => t('Add spotlight'),
    'pane category' => t('Custom'),
    'pane top level' => TRUE,
    'pane icon' => drupal_get_path('module', 'panopoly_widgets') . '/images/icon_spotlight.png',
    'admin' => array(
      'path' => 'admin/structure/fieldable-panels-panes/%fieldable_panels_panes_type',
      'bundle argument' => 3,
      'real path' => 'admin/structure/fieldable-panels-panes/spotlight',
      'access arguments' => array(
        'administer fieldable panels panes',
      ),
    ),
  );
}