function ctools_get_addressable_content

Fetch a piece of content from the addressable content system.

Parameters

$address: A string or an array representing the address of the content.

$type: The type of content to return. The type is dependent on what the content actually is. The default, 'content' means a simple string representing the content. However, richer systems may offer more options. For example, Panels might allow the fetching of 'display' and 'pane' objects. Page Manager might allow for the fetching of 'task_handler' objects (AKA variants).

File

includes/content.inc, line 852

Code

function ctools_get_addressable_content($address, $type = 'content') {
    if (!is_array($address)) {
        $address = explode('::', $address);
    }
    if (!$address) {
        return;
    }
    // This removes the module from the address so the
    // implementor is not responsible for that part.
    $module = array_shift($address);
    return module_invoke($module, 'addressable_content', $address, $type);
}