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

Constructor

Fichier

./quicktabs.classes.inc, line 128

Classe

QuickSet
A QuickSet object is an unrendered Quicktabs instance, essentially just a container of content items, as defined by its configuration settings and the array of content items it contains.

Code

public function __construct($name, $contents, $settings) {
    $this->name = $name;
    $this->contents = array();
    foreach ($contents as $key => $item) {
        // Instantiate a content renderer object and add it to the contents array.
        if ($renderer = self::getContentRenderer($item)) {
            $this->contents[$key] = $renderer;
        }
    }
    $default_settings = self::getDefaultSettings();
    $this->settings = array_merge($default_settings, $settings);
    $this->prepareContents();
    // Set the default style if necessary.
    if ($this->settings['style'] == 'default') {
        $this->settings['style'] = variable_get('quicktabs_tabstyle', 'nostyle');
    }
}