Same name in other branches
  1. 8.x-1.x src/QuickPreRenderedContent.php \Drupal\quicktabs\QuickPreRenderedContent::__construct()

Constructor

Fichier

./quicktabs.classes.inc, line 493

Classe

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…

Code

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;
}