class QuickPreRenderedContent in Quick Tabs 7.3
This class implements the same interface that content plugins do but it is not a content plugin. It is a special class for pre-rendered content which is used when "custom" tabs are added to existing Quicktabs instances in a call to quicktabs_build_quicktabs().
Hierarchy
- class \QuickPreRenderedContent implements QuickContentRenderable
Expanded class hierarchy of QuickPreRenderedContent
File
- ./
quicktabs.classes.inc, line 464
View source
class QuickPreRenderedContent implements QuickContentRenderable {
public static function getType() {
return 'prerendered';
}
/**
* Used as the title of the tab.
* @var title
*/
protected $title;
/**
* A render array of the contents.
* @var array
*/
protected $rendered_content;
/**
* An array containing the information that defines the tab content, specific
* to its type.
* @var array
*/
protected $settings;
/**
* Constructor
*/
public function __construct($item) {
$contents = isset($item['contents']) ? $item['contents'] : array();
if (!is_array($contents)) {
$contents = array(
'#markup' => $contents,
);
}
$this->rendered_content = $contents;
$this->title = isset($item['title']) ? $item['title'] : '';
unset($item['title'], $item['contents']);
$this->settings = $item;
}
/**
* Accessor for the tab title.
*/
public function getTitle() {
return $this->title;
}
/**
* Accessor for the tab settings.
*/
public function getSettings() {
return $this->settings;
}
/**
* The render method simply returns the contents that were passed in and
* stored during construction.
*/
public function render($hide_empty = FALSE, $args = array()) {
return $this->rendered_content;
}
/**
* This content cannot be rendered via ajax so we don't return any ajax keys.
*/
public function getAjaxKeys() {
return array();
}
public function getUniqueKeys() {
return array(
'class_suffix',
);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
QuickPreRenderedContent:: |
protected | property | A render array of the contents. | |
QuickPreRenderedContent:: |
protected | property | An array containing the information that defines the tab content, specific to its type. | |
QuickPreRenderedContent:: |
protected | property | Used as the title of the tab. | |
QuickPreRenderedContent:: |
public | function |
This content cannot be rendered via ajax so we don't return any ajax keys. Overrides QuickContentRenderable:: |
|
QuickPreRenderedContent:: |
public | function |
Accessor for the tab settings. Overrides QuickContentRenderable:: |
|
QuickPreRenderedContent:: |
public | function |
Accessor for the tab title. Overrides QuickContentRenderable:: |
|
QuickPreRenderedContent:: |
public static | function |
Returns the short type name of the content plugin, e.g. 'block', 'node',
'prerendered'. Overrides QuickContentRenderable:: |
|
QuickPreRenderedContent:: |
public | function |
Returns an array of keys, sufficient to represent the content uniquely. Overrides QuickContentRenderable:: |
|
QuickPreRenderedContent:: |
public | function |
The render method simply returns the contents that were passed in and
stored during construction. Overrides QuickContentRenderable:: |
|
QuickPreRenderedContent:: |
public | function | Constructor |