You are here

function slickgrid_views_plugin::list_addable_entities in Slickgrid 7

1 call to slickgrid_views_plugin::list_addable_entities()
slickgrid_views_plugin::options_form in includes/slickgrid_views_plugin.inc
Add settings for the particular slickgrid.

File

includes/slickgrid_views_plugin.inc, line 524

Class

slickgrid_views_plugin
Extending the view_plugin_style class to provide a slickgrid style.

Code

function list_addable_entities() {
  $entities = array();
  foreach ($entities_info = entity_get_info() as $entity_type => $entity_info) {
    foreach ($entity_info['bundles'] as $bundle_name => $bundle) {
      if (isset($bundle['add']) && $bundle['add']) {
        $entities[$entity_type . '/' . $bundle_name] = $entity_info['label'] . ': ' . $bundle['label'];
      }
    }
  }
  return $entities;
}