You are here

function ctools_custom_content_type_content_types in Chaos Tool Suite (ctools) 7

Same name and namespace in other branches
  1. 6 plugins/content_types/custom/custom.inc \ctools_custom_content_type_content_types()

Return all custom content types available.

File

plugins/content_types/custom/custom.inc, line 47
Custom content type.

Code

function ctools_custom_content_type_content_types() {
  $types =& drupal_static(__FUNCTION__);
  if (isset($types)) {
    return $types;
  }
  ctools_include('export');
  $types = array();
  $types['custom'] = _ctools_default_content_type_content_type();
  if (module_exists('ctools_custom_content')) {
    foreach (ctools_export_crud_load_all('ctools_custom_content') as $name => $content) {
      $types[$name] = _ctools_custom_content_type_content_type($content);
    }
  }
  return $types;
}