You are here

function _ds_extras_entity_info in Display Suite 7.2

Same name and namespace in other branches
  1. 7 modules/ds_extras/ds_extras.registry.inc \_ds_extras_entity_info()

Implements hook_entity_info().

1 call to _ds_extras_entity_info()
ds_extras_entity_info in modules/ds_extras/ds_extras.module
Implements hook_entity_info().

File

modules/ds_extras/includes/ds_extras.registry.inc, line 37
Display Suite Extras registry file.

Code

function _ds_extras_entity_info() {
  if (!variable_get('ds_extras_vd', FALSE)) {
    return;
  }
  $bundles = array();
  ctools_include('export');
  $vd_settings = ctools_export_crud_load_all('ds_vd');
  foreach ($vd_settings as $key => $vd) {
    $bundles[$vd->vd] = array(
      'label' => check_plain($vd->label),
      'admin' => array(
        'path' => 'admin/structure/ds/vd/manage/' . $vd->vd,
      ),
    );
  }

  // Register a views entity on behalf of Views.
  $return = array(
    'ds_views' => array(
      'label' => t('Display Suite Views'),
      'bundles' => $bundles,
      'ds_display' => TRUE,
      'base table' => 'views_view',
      'entity keys' => array(
        'id' => 'vid',
        'label' => 'name',
      ),
    ),
  );
  return $return;
}