You are here

function ctools_content_get_all_types in Chaos Tool Suite (ctools) 6

Same name and namespace in other branches
  1. 7 includes/content.inc \ctools_content_get_all_types()

Get an array of all content types that can be fed into the display editor for the add content list, regardless of availability.

File

includes/content.inc, line 718
Contains the tools to handle pluggable content that can be used by other applications such as Panels or Dashboard.

Code

function ctools_content_get_all_types() {
  $plugins = ctools_get_content_types();
  $available = array();
  foreach ($plugins as $id => $plugin) {
    foreach (ctools_content_get_subtypes($plugin) as $subtype_id => $subtype) {

      // If we made it through all the tests, then we can use this content.
      $available[$id][$subtype_id] = $subtype;
    }
  }
  return $available;
}