function views_content_views_content_type_content_types

cis7 views.inc views_content_views_content_type_content_types($plugin)
cle7 views.inc views_content_views_content_type_content_types($plugin)
elmsmedia7 views.inc views_content_views_content_type_content_types($plugin)
icor7 views.inc views_content_views_content_type_content_types($plugin)
meedjum_blog7 views.inc views_content_views_content_type_content_types($plugin)
mooc7 views.inc views_content_views_content_type_content_types($plugin)

Return all content types available.

File

sites/all/modules/ulmus/ctools/views_content/plugins/content_types/views.inc, line 38
Content type plugin to expose all views as content.

Code

function views_content_views_content_type_content_types($plugin) {
  $types = array();
  // It can be fairly intensive to calculate this, so let's cache this in the
  // cache_views table. The nice thing there is that if views ever change, that
  // table will always be cleared. Except for the occasional default view, so
  // we must use the Views caching functions in order to respect Views caching
  // settings.
  views_include('cache');
  $data = views_cache_get('views_content_all', TRUE);
  if (!empty($data->data)) {
    $types = $data->data;
  }

  if (empty($types)) {
    $views = views_get_all_views();

    foreach ($views as $view) {
      if (empty($view->disabled)) {
        $types[$view->name] = _views_content_views_content_type($view);
      }
    }

    views_cache_set('views_content_all', $types, TRUE);
  }

  return $types;
}
Error | ELMSLN API

Error

×

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/api.elmsln.org/includes/common.inc:2791) in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/api.elmsln.org/sites/all/modules/apc/drupal_apc_cache.inc).
The website encountered an unexpected error. Please try again later.