Same name and namespace in other branches
  1. 7.x-3.x quicktabs.classes.inc \QuickSet::__construct()

Constructor

File

src/QuickSet.php, line 132

Class

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.

Namespace

Drupal\quicktabs

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