You are here

function views_system_get_type_list in Views System 7.4

Same name and namespace in other branches
  1. 8 views_system.module \views_system_get_type_list()

Helper function to retrieve list of types.

1 string reference to 'views_system_get_type_list'
views_system_views_data in views/views_system.views.inc
Implements of hook_views_data().

File

./views_system.module, line 268
Extends the Views module and provides fields, filter criteria, and sort criteria for Modules/Themes/Theme engines.

Code

function views_system_get_type_list() {
  $list = array(
    'module' => t('Module'),
    'profile' => t('Profile'),
    'theme' => t('Theme'),
    'theme_engine' => t('Theme engine'),
  );
  $types = db_query('SELECT DISTINCT(type) FROM {views_system} ORDER BY type')
    ->fetchAllKeyed(0, 0);
  return array_intersect_key($list, $types);
}