Namespace
Drupal\quicktabs
File
-
src/QuickPreRenderedContent.php
View source
<?php
namespace Drupal\quicktabs;
class QuickPreRenderedContent implements QuickContentRenderableInterface {
public static function getType() {
return 'prerendered';
}
protected $title;
protected $rendered_content;
protected $settings;
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;
}
public function getTitle() {
return $this->title;
}
public function getSettings() {
return $this->settings;
}
public function render($hide_empty = FALSE, $args = array()) {
return $this->rendered_content;
}
public function getAjaxKeys() {
return array();
}
public function getUniqueKeys() {
return array(
'class_suffix',
);
}
}
Classes
| Title |
Deprecated |
Summary |
| QuickPreRenderedContent |
|
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… |