Renders collapsible items as specified on [[items]].
@throws InvalidConfigException if label isn't specified
@return string the rendering result
552453
public function renderItems()
    {
        $items = [];
        $index = 0;
        foreach ($this->items as $key => $item) {
            if (!is_array($item)) {
                $item = ['content' => $item];
            }
            if (!array_key_exists('label', $item)) {
                if (is_int($key)) {
                    throw new InvalidConfigException("The 'label' option is required.");
                } else {
                    $item['label'] = $key;
                }
            }
            $header = ArrayHelper::remove($item, 'label');
            $options = ArrayHelper::getValue($item, 'options', []);
            Html::addCssClass($options, ['panel' => 'card']);
            $items[] = Html::tag('div', $this->renderItem($header, $item, $index++), $options);
        }

        return implode("\n", $items);
    }
901097
public function render()
	{
		$legend		= $this->renderInner( $this->legend );
		if( !is_string( $legend ) )
			throw new InvalidArgumentException( 'Fieldset legend is neither rendered nor renderable' );
		
		$content	= $this->renderInner( $this->content );
		if( !is_string( $content ) )
			throw new InvalidArgumentException( 'Fieldset content is neither rendered nor renderable' );

		return UI_HTML_Tag::create( "fieldset", $legend.$content, $this->getAttributes() );
	}
1348629
public function renderItems()
    {
        $thumbnails = array();
        $data = $this->dataProvider->getData();

        if (!empty($data)) {
            $owner = $this->getOwner();
            $render = $owner instanceof CController ? 'renderPartial' : 'render';
            foreach ($data as $i => $row) {
                $thumbnail = array();
                $d = $this->viewData;
                $d['index'] = $i;
                $d['data'] = $row;
                $d['widget'] = $this;
                $thumbnail['caption'] = $owner->$render($this->itemView, $d, true);
                if (isset($this->url)) {
                    $thumbnail['url'] = $this->evaluateExpression($this->url, array('data' => $row));
                }
                if (isset($this->span)) {
                    $thumbnail['span'] = $this->span;
                }
                $thumbnails[] = $thumbnail;
            }
            echo TbHtml::thumbnails($thumbnails, $this->htmlOptions);
        } else {
            $this->renderEmptyText();
        }
    }
997722
protected function renderNode($node)
    {
        if (is_string($node)) {
            $node = ['name' => $node];
        }
        if (!isset($node['name'])) {
            throw new InvalidConfigException("The 'name' option is required.");
        }

        $lines = [];

        $nodeOptions = array_merge([
            'data-node-id' => $node['id'],
            'data-node-name' => Html::encode($node['name']),
            'data-action-name' => 'move',   ///[node move action]
            'data-action-url' => Url::to(ArrayHelper::getValue($node, 'move-url', $this->createUrl('move', $node))),
            // more node data ...
        ], $this->nodeOptions, ArrayHelper::getValue($node, 'options', []));
        $tag = ArrayHelper::remove($nodeOptions, 'tag', 'li');

        $lines[] = Html::beginTag($tag, $nodeOptions);

        $lines[] = Html::beginTag('div');

        $lines[] = $this->renderNodeName($node);
        $lines[] = $this->renderNodeActions($node);

        $lines[] = Html::endTag('div');

        if (!empty($node['nodes'])) {
            $lines[] =  $this->renderNodes($node['nodes']);
        }

        $lines[] =  Html::endTag($tag);

        return implode("\n", $lines);
    }
1204453
public function renderItem($item)
    {
        if (is_string($item)) {
            return $item;
        }
        if (!isset($item['label'])) {
            throw new InvalidConfigException("The 'label' option is required.");
        }
        $encodeLabel = isset($item['encode']) ? $item['encode'] : $this->encodeLabels;
        $label = $encodeLabel ? Html::encode($item['label']) : $item['label'];
        $options = ArrayHelper::getValue($item, 'options', []);
        $items = ArrayHelper::getValue($item, 'items');
        $url = ArrayHelper::getValue($item, 'url', '#');
        $linkOptions = ArrayHelper::getValue($item, 'linkOptions', []);

        //HACK
        $label = "<span>".$label."</span>";
        $icon = isset($item['icon'])?$item['icon']:"";
        if(!empty($icon)){
            $label = "<i class='".$icon."'></i> ".$label;
        }
        $badge = isset($item['badge'])?$item['badge']:"";
        $badgeClass = isset($item['badgeClass'])?$item['badgeClass']:"";
        if(!empty($badge)){
            $label = $label." <small class='badge ".@$badgeClass."'>".$badge."</small>";
        }

        if (isset($item['active'])) {
            $active = ArrayHelper::remove($item, 'active', false);
        } else {
            $active = $this->isItemActive($item);
        }

        if ($items !== null) {
            $linkOptions['data-toggle'] = 'dropdown';
            Html::addCssClass($options, 'treeview');
            Html::addCssClass($linkOptions, 'dropdown-toggle');
            $label .= ' ' . Html::tag('i', '', ['class' => 'fa pull-right fa-angle-left']);
            if (is_array($items)) {
                if ($this->activateItems) {
                    $items = $this->isChildActive($items, $active);
                }
                $items = DropdownSide::widget([
                    'items' => $items,
                    'encodeLabels' => $this->encodeLabels,
                    'clientOptions' => false,
                    'view' => $this->getView(),
                ]);
            }
        }

        if ($this->activateItems && $active) {
            Html::addCssClass($options, 'active');
        }

        return Html::tag('li', Html::a($label, $url, $linkOptions) . $items, $options);
    }
1187210
public function render(array $metaTags = array())
    {
        $html = '';

        foreach ($metaTags as $metaTag) {
            if (!$metaTag instanceof Item) {
                throw new InvalidArgumentException('metaTags', 'Cannot render meta tag, not an instance of \Netgen\Bundle\OpenGraphBundle\MetaTag\Item');
            }

            $tagName = htmlspecialchars($metaTag->getTagName(), ENT_QUOTES | ENT_SUBSTITUTE, 'UTF-8');
            $tagValue = htmlspecialchars($metaTag->getTagValue(), ENT_QUOTES | ENT_SUBSTITUTE, 'UTF-8');

            if (!empty($tagName) && !empty($tagValue)) {
                $html .= "<meta property=\"$tagName\" content=\"$tagValue\" />\n";
            }
        }

        return $html;
    }
408621
public function render()
    {
        $output = '';

        foreach ($this->items as $message) {
            $output .= $message->render();
        }

        return $output;
    }
275029
public function render(): string
    {
        $elementKey = $this->arguments['elementKey'];
        $fieldKey = $this->arguments['fieldKey'];
        $field = $this->arguments['field'];
        $table = $this->arguments['table'];

        $this->fieldHelper = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('MASK\\Mask\\Helper\\FieldHelper');
        // if we have the whole field configuration
        if ($field) {
            // check if this field is in an repeating field
            if ($field["inlineParent"]) {
                // if yes, the label is in the configuration
                $label = $field["label"];
            } else {
                // otherwise the type can only be tt_content or pages
                if ($table) {
                    // if we have table param, the type must be the table
                    $type = $table;
                } else {
                    // otherwise try to get the label, set param $excludeInlineFields to true
                    $type = $this->fieldHelper->getFieldType($fieldKey, $elementKey, true);
                }
                $label = $this->fieldHelper->getLabel($elementKey, $fieldKey, $type);
            }
        } else {
            // if we don't have the field configuration, try the best to fetch the type and the correct label
            $type = $this->fieldHelper->getFieldType($fieldKey, $elementKey, false);
            $label = $this->fieldHelper->getLabel($elementKey, $fieldKey, $type);
        }
        return $label;
    }
55820
public function render()
    {
        $returnValue = $this->renderLabel();
        
        $returnValue .= "<select name='{$this->name}' id='{$this->name}' ";
        $returnValue .= $this->renderAttributes();
        $returnValue .= ">";
        if (! empty($this->emptyOption)) {
            $this->options = array_merge(array(
                ' ' => $this->emptyOption), $this->options);
        }
        foreach ($this->options as $optionId => $optionLabel) {
            $returnValue .= "<option value='{$optionId}' ";
            if ($this->value === $optionId) {
                $returnValue .= " selected='selected' ";
            }
            $returnValue .= ">" . _dh($optionLabel) . "</option>";
        }
        $returnValue .= "</select>";
        
        return (string) $returnValue;
    }
1010118
protected function renderMulti()
    {
        $strHtml = '';

        // An indexed array means use the label as the value also.
        $bLabelIsValue = isset($this->aOptions[0]);
        foreach ($this->aOptions as $mValue => $strLabel) {
            if ($bLabelIsValue)
                $mValue = $strLabel;
            $strSelected = isset($this->mValue) && in_array($strLabel, (array)$this->mValue)
                ? ' checked' : '';
            $strHtml .= '<label class="sked-input-multi">'
                . '<input value="' . $mValue . '" ' . $this->renderAttribs() . $strSelected . '> '
                . $strLabel . '</label>';
        }

        return $strHtml;
    }
1366340
public function render()
    {
        if ( ! $this->label->hasTextContent()) {
            $this->input->attributes->addAttributeClass('position-static');
        }

        return parent::render();
    }
696867
public function render()
    {
        $result = $this->spec->check($this->attributes);
        if ($result->failed()) {
            throw new InvalidAttributesException($result);
        }

        $attributes = $this->renderAttributes();
        if (strlen($attributes)) {
            $attributes = ' ' . $attributes;
        }

        if ($this->selfClosing) {
            return vsprintf(
                '<%s%s/>',
                [$this->tagName, $attributes]
            );
        }

        return vsprintf(
            '<%s%s>%s</%s>',
            [
                $this->tagName,
                $attributes,
                $this->renderContent(),
                $this->tagName,
            ]
        );
    }
249320
public function RenderLabel () {
		/** @var $this \MvcCore\Ext\Forms\IField */
		$renderMode = $this instanceof \MvcCore\Ext\Forms\Fields\ILabel
			? $this->GetRenderMode()
			: \MvcCore\Ext\Forms\IForm::FIELD_RENDER_MODE_NO_LABEL;
		if ($renderMode == \MvcCore\Ext\Forms\IForm::FIELD_RENDER_MODE_NO_LABEL) 
			return '';
		$attrsStr = $this->renderLabelAttrsWithFieldVars();
		$formViewClass = $this->form->GetViewClass();
		return $formViewClass::Format(static::$templates->label, [
			'id'		=> $this->id,
			'label'		=> $this->label,
			'attrs'		=> $attrsStr ? " $attrsStr" : '',
		]);
	}
980133
public function Render()
    {
        $string = $this->string;
        $tag = $this->tag;

        $classes = $this->classes;
        if (Count($classes)) {
            if ($classPrefix = $this->classPrefix) {
                foreach ($classes as $key => $value) {
                    $prefixedClass = $classPrefix . '__' . $value;
                    $classes[$prefixedClass] = $prefixedClass;
                }
            }
            $this->addAttribute('class', implode(' ', $classes));
        }

        if ($this->isVoidElement() && $string) {
            if ($voidAttributeName = $this->VoidElements[$tag]) {
                $this->addAttribute($voidAttributeName, $string);
            } else {
                throw new InvalidArgumentException("Void element \"{$tag}\" cannot have string");
            }
        }

        $attributes = [];
        foreach ($this->attributes as $name => $value) {
            $attributes[] = sprintf(
                '%s="%s"',
                $name,
                Convert::raw2att($value)
            );
        }
        $attributes = Count($attributes) ? ' ' . implode(' ', $attributes) : '';

        if ($this->isVoidElement()) {
            return "<{$tag}{$attributes} />";
        }

        if (!isset($string) || !$string || $string == '') {
            return null;
        }

        return "<{$tag}{$attributes}>{$string}</{$tag}>";
    }
191862
public function renderDropDownItem($item, &$active = false)
    {
        if (is_string($item)) {
            return $item;
        }
        if (!isset($item['label'])) {
            throw new InvalidConfigException("The 'label' option is required.");
        }
        $subItems = ArrayHelper::getValue($item, 'items');

        $options = ArrayHelper::getValue($item, 'options', []);
        $active = $this->isItemActive($item);

        $item['linkOptions'] = ['class' => 'dropdown-toggle'];
        if (is_array($subItems)) {
            if ($this->activateItems) {
                $subItems = $this->isChildActive($subItems, $active);
            }
            $subItems = $this->renderSubItems($subItems, $active);
        }
        if ($this->activateItems && $active) {
            Html::addCssClass($options, 'active open');
        }
        $linkHtml = $this->renderItemLink($item);


        return Html::tag('li', $linkHtml . $subItems, $options);
    }
1354943
public function render()
    {
        $output[] = $this->open();

        if ($this->withLabel) {
            $output[] = $this->now . '%';
        } else {
            $output[] = $this->label;
        }

        $output[] = $this->close();

        return implode(PHP_EOL, $output);
    }
1224674
public function renderControls()
    {
        if (isset($this->controls[0], $this->controls[1])) {
            return Html::a($this->controls[0], '#' . $this->options['id'], [
                'class' => 'left carousel-control',
                'data-slide' => 'prev',
            ]) . "\n"
            . Html::a($this->controls[1], '#' . $this->options['id'], [
                'class' => 'right carousel-control',
                'data-slide' => 'next',
            ]);
        } elseif ($this->controls === false) {
            return '';
        } else {
            throw new InvalidConfigException('The "controls" property must be either false or an array of two elements.');
        }
    }