You are here

function ctools_content_admin_info in Chaos Tool Suite (ctools) 6

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

Get the administrative title from a given content type.

Parameters

$type: The content type. May be the name or an already loaded content type object.

$subtype: The subtype being rendered.

$conf: The configuration for the content type.

$context: An array of context objects available for use. These may be placeholders.

File

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

Code

function ctools_content_admin_info($type, $subtype, $conf, $context = NULL) {
  if (is_array($type)) {
    $plugin = $type;
  }
  else {
    $plugin = ctools_get_content_type($type);
  }
  if ($function = ctools_plugin_get_function($plugin, 'admin info')) {
    $output = $function($subtype, $conf, $context);
  }
  if (empty($output) || !is_object($output)) {
    $output = new stdClass();
    $output->title = t('No info');
    $output->content = t('No info available.');
  }
  return $output;
}