Rendering elementu formularza
@param array
@return string
4143
protected function _renderImprintElement($element)
    {
        //walidacja
        if (!isset($element['type']) || !isset($element['name'])) {
            return;
        }
        //identyfikator pola
        $fieldId = $this->getId() . '-' . (new \Mmi\Filter\Url)->filter($element['name']);

        //input poster video
        if ($element['type'] == 'poster') {
            $this->setOption('poster', true);
            $html = "
                <div class='frame-extractor'>
                    <div class='row'>
                        <div class='col d-flex justify-content-center video-container'>
                            <video id='video' controls=''>
                                <source  id='urlVideo' type='video/mp4'>
                                <p>Twója przeglądarka nie obsługuje video w formacie mp4.</p>
                            </video>
                            <input id='poster' type='hidden' name='poster' value=''/>
                            <button id='frame-camera' type='button' class='btn btn-outline-primary frame-camera' data-toggle='tooltip' data-placement='top' title='Złap aktualną ramkę z wideo'>
                                <i class='fa fa-2 fa-camera'></i>
                            </button>
                            <button id='frame-upload' type='button'  data-toggle='tooltip' data-placement='top' title='Prześlij swoją ramkę wideo. Rozmiar obraka musi być conajmniej takiego rozmiaru jak wgrane wideo.' class='btn btn-outline-primary frame-upload'>
                                <i class='fa fa-2 fa-upload'></i>
                            </button>
                        </div>
                    </div>
                    <div class='row'>
                        <div class='col'>
                            <input type='file' name='userPoster' id='userPoster' accept='image/*'>
                        </div>
                    </div>
                    <div class='row'>
                        <div class='col'>
                            <div id='output'>
                            </div>
                        </div>
                    </div>
                </div>
			";
            return $html;
        }

        //walidacja
        if (!isset($element['label'])) {
            return;
        }
        //element label
        $label = ' <div class="form-group"><label for="' . $fieldId . '">' . $element['label'] . (($element['type'] != 'checkbox') ? ':' : '') . '</label>';
        //input text
        if ($element['type'] == 'text') {
            return $label .
                '<input id="' . $fieldId . '" type="' . $element['type'] . '" name="' . $element['name'] . '" class="imprint ' . $element['type'] . '"></div>';
        }
        //input checkbox
        if ($element['type'] == 'checkbox') {
            return '<input id="' . $fieldId . '" type="' . $element['type'] . '" name="' . $element['name'] . '" value="1" class="imprint ' . $element['type'] . '">' . $label;
        }
        //textarea
        if ($element['type'] == 'textarea') {
            return $label .
                '<textarea id="' . $fieldId . '" name="' . $element['name'] . '" class="imprint ' . $element['type'] . '"></textarea></div>';
        }
        //tinymce
        if ($element['type'] == 'tinymce') {
            return $label .
                '<textarea id="' . $fieldId . '" name="' . $element['name'] . '" class="plupload-edit-tinymce imprint ' . $element['type'] . '"></textarea></div>';
        }
        //lista
        if ($element['type'] == 'select') {

            $option = [];
            foreach ($element['options'] as $key => $value) {
                if (is_array($value)) {
                    $data = '';
                    foreach ($value['data'] as $data_key => $data_val) {
                        $data .= str_replace('_', '-', $data_key) . '="' . $data_val . '"';
                    }
                    array_push($option, '<option value="' . $key . '" ' . $data . '>' . $value['value'] . '</option>"');
                } else {
                    array_push($option, '<option value="' . $key . '">' . $value . '</option>"');
                }
            }

            //dodaje podglad obrazka
            $image = '';
            if (isset($element['preview'])) {

                $this->setOption('preview', true);

                $image = "
				<div class='col_3' id='image_$fieldId'></div>
				<script type='text/javascript'>
				// <![CDATA[
					$(document).ready(function () {
						'use strict';
						$('#$fieldId').change(function() {
							var src = 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7';
							if( $(this).find(':selected').attr('data-image-url') != undefined ){
								src = $(this).find(':selected').attr('data-image-url')
							}

							$('#image_$fieldId').html( images + src +'\"/>' );
						});
					});
				// ]]>
				</script>
				<div class='col_12'></div><br clear='both'/>
				";
            }

            return $label .
                '<select id="' . $fieldId . '" name="' . $element['name'] . '" class="' . ($image != '' ? 'col_9' : '') . ' plupload-edit-tinymce imprint ' . $element['type'] . '">' . implode($option) . '</select></div>' . $image;
        }
    }
253567
public function render()
    {

        $attr = [];

        foreach($this->attributes as $k => $v) {
            $attr[] = sprintf('%s="%s"', $k, $v);
        }

        return sprintf('<label %s>%s</label>',
            implode(' ', $attr),
            trim($this->labelText)
        );

    }
682458
public function renderAsTable() {
    $html = '';
    foreach ($this->cells as $iRow => $rowCells) {
      $rowHtml = '';
      foreach ($rowCells as $iCol => $cell) {
        $rowHtml .= $cell->render();
      }
      $html .= '    <tr>' . $rowHtml . '</tr>' . "\n";
    }
    return "<table>\n  <tbody>\n" . $html . "  </tbody>\n</table>\n";
  }
622606
function render() {return df_cc_n(df_map_k($this->_blocks, function($selector, array $rules) {
		/** @var string $selector */ /** @var string[] $rules */
		$rulesS = df_tab_multiline(df_cc_n($rules)); /** @var string $rulesS */
		return "{$selector} {\n{$rulesS}\n}";
	}));}
206368
private function renderArray(RendererInterface $r, array $array, int $level, bool $hideHeader = false): string
    {
        if (!$hideHeader) {
            $count = count($array);

            //Array size and scope
            $output = $r->apply("array({$count})", 'type', 'array') . "\n";
            $output .= $r->indent($level) . $r->apply('[', 'syntax', '[') . "\n";
        } else {
            $output = '';
        }

        foreach ($array as $key => $value) {
            if (!is_numeric($key)) {
                if (is_string($key) && $r->escapeStrings()) {
                    $key = htmlspecialchars($key);
                }

                $key = "'{$key}'";
            }

            $output .= $this->renderValue($r, $value, "[{$key}]", $level + 1);
        }

        if (!$hideHeader) {
            //Closing array scope
            $output .= $r->indent($level) . $r->apply(']', 'syntax', ']') . "\n";
        }

        return $output;
    }
1331054
public function render($str_pad_flag = STR_PAD_RIGHT)
    {
        $stacks = array();
        if ($this->column_size===0 && $this->line_size===0 && $this->cell_size===0) {
            $this->_parseTableSizes();
        }

        foreach (self::$_table_parts as $part) {
            if (!empty($this->{$part}) && is_array($this->{$part})) {
                $stacks[] = 'hseparator';
                foreach ($this->{$part} as $part_line) {
                    $stack_line = array();
                    $stack_line[] = 'vseparator';
                    foreach ($part_line as $i=>$part_cell) {
                        if (count($part_line)<$this->getColumnSize() && $i===count($part_line)-1) {
                            $stack_line[] = str_pad(' '.$part_cell, 
                                ( ($this->getColumnSize() - count($part_line) + 1) * $this->getCellSize())
                                     + ($this->getColumnSize() - count($part_line)), 
                                ' ', $str_pad_flag);
                        } else {
                            $stack_line[] = ' '.$part_cell.' ';
                        }
                        $stack_line[] = 'vseparator';
                    }
                    $stacks[] = $stack_line;
                }
            }
        }
        $stacks[] = 'hseparator';

        // special footer if no footer
        if (!count($this->tfoot)) {
            $stacks[] = array(
                'vseparator',
                str_pad(' '.$this->getSizesInfos(), ($this->getColumnSize() * $this->getCellSize())
                    + ($this->getColumnSize() - 1), ' ', $str_pad_flag),
                'vseparator'
            );
            $stacks[] = 'hseparator';
        }

        $str = '';
        if (!empty($this->title)) {
            $str .= $this->title."\n";
        }
        foreach ($stacks as $line) {
            $str .= "\n";
            if (is_array($line)) {
                foreach ($line as $cell) {
                    if ('vseparator'===$cell) {
                        $str .= '|';
                    } else {
                        $str .= str_pad($cell, $this->getCellSize(), ' ', $str_pad_flag);
                    }
                }
            } elseif ('hseparator'===$line) {
                for ($i=0; $i<$this->getColumnSize(); $i++) {
                    $str .= str_pad('+', ($this->getCellSize() + 1), '-');
                }
                $str .= '+';
            }
        }        
        return $str;
    }
295789
function render()
	{
		$thead = '';
		foreach($this->head as $cell) $thead .= $this->renderCell('th', $cell);
		$tbody = array();
		foreach($this->body as $row) {
			$cells = '<tr>';
			foreach($row as $cell) $cells .= $this->renderCell('td', $cell);
			$cells .= '</tr>';
			$tbody[] = $cells;
		}
		$table = '<table class="admList">';
		$table .= '<tr>'.$thead.'</tr>';
		$table .= implode("\n", $tbody);
		$table .= '</table>';
		return $table;
	}
746844
public function render(): string
    {
        if (empty($this->breadcrumbs)) {
            return '';
        }

        $classes = $this->getClasses('listElementClasses');
        $element = $this->getOption('listElement');

        return "<{$element} class=\"{$classes}\">" . $this->renderCrumbs() . "</{$element}>";
    }
1189307
public function render()
    {
        $output[] = $this->open();

        if ($this->subText instanceof Element) {
            $this->header->childNodes->push($this->subText);
        }

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

        return implode(PHP_EOL, $output);
    }
1292497
public function render()
    {
        $codeFormat = '$.toast(%s, %s);';
        $items = array();
        $js = '';

        foreach ($this->container as $toast) {
            $items[] = sprintf($codeFormat, Json::encode($toast->getMessage()), Json::encode($toast->getOptions()));
        }

        if (!empty($items)) {
            $js = '<script type="text/javascript">//<![CDATA['."\n"
                . 'jQuery(function($) {' . "\n"
                . implode("\n", $items) . "\n"
                . "});\n" . '//]]></script>';
        }

        return $js;
    }
120232
public function displayDepth(array $array)
    {
        $output = '';
        foreach ([
            'asks',
            'bids',
        ] as $type) {
            $entries = $array[$type];
            if ($type === 'asks') {
                $entries = array_reverse($entries);
            }

            $output .= "{$type}:" . PHP_EOL;
            foreach ($entries as $price => $quantity) {
                $total = number_format($price * $quantity, 8, '.', '');
                $quantity = str_pad(str_pad(number_format(rtrim($quantity, '.0')), 10, ' ', STR_PAD_LEFT), 15);
                $output .= "{$price} {$quantity} {$total}" . PHP_EOL;
            }
            // echo str_repeat('-', 32).PHP_EOL;
        }
        return $output;
    }
1017180
public function outputElement() : string
    {
        if ('1' == $this->getValue()) {
            $this->setChecked(true);
        } else {
            $this->setChecked(false);
        }
        $attributes = [];
        foreach ($this->attributes as $name => $value) {
            $attributes[$name] = $name . '="' . $value . '"';
        }
        $attributes['value'] = 'value="1"';
        return '<input ' . implode(' ', $attributes) . ' />';
    }
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}>";
    }
1358871
public function render($content)
    {
        $useBootstrap = \MUtil_Bootstrap::enabled();

        if ((null === ($element = $this->getElement())) ||
            (null === ($view = $element->getView()))) {
            return $content;
        }

        $cellDecorators = $this->getCellDecorators();

        $containerDiv = \MUtil_Html::create()->div(array('id' => 'tabElement'));


        if ($element instanceof \MUtil_Form_Element_Table) {
            $containerDiv->appendAttrib('class', $element->getAttrib('class'));
            $subforms = $element->getSubForms();
        } elseif ($element instanceof \Zend_Form)  {
            $cellDecorators = null;
            $subforms = array($element);
        }
        
        if ($subforms) {
            $activeTabs = false;
            if (count($subforms) > 1) {
                $activeTabs = true;
                if (!$useBootstrap) {
                    $jquery = $view->jQuery();

                    $js = sprintf('%1$s("#tabElement").tabs();', \ZendX_JQuery_View_Helper_JQuery::getJQueryHandler());

                    if ($selectedTabElement = $this->getOption('selectedTabElement')) {
                        $js .= sprintf('%1$s("#tabElement").on("tabsactivate", function(event, ui) { console.log(ui.newTab.text()); %1$s("#%2$s").val(ui.newTab.text()) });', \ZendX_JQuery_View_Helper_JQuery::getJQueryHandler(), $selectedTabElement);    
                    }
                    
                    $jquery->addOnLoad($js);
                } else {
                    $jquery = $view->jQuery();
                    
                    if ($selectedTabElement = $this->getOption('selectedTabElement')) {
                        $js = sprintf('%1$s(\'a[data-toggle="tab"]\').on(\'shown.bs.tab\', function (e) {
                            var tabtext = $(e.target).text();
                            %1$s("#%2$s").val(tabtext);
                    })', \ZendX_JQuery_View_Helper_JQuery::getJQueryHandler(), $selectedTabElement);
                        
                    $jquery->addOnLoad($js);
                    }
                }                   

                $list = $containerDiv->ul(array('class' => 'nav nav-tabs', 'role' => 'tablist'));
            }
            $tabNumber = 0;

            $tabContainerDiv = $containerDiv->div(array('class' => 'tab-content'));//\MUtil_Html::create()->div(array('class' => 'tab-content'));

            $active = $this->getOption('active');
            foreach($subforms as $subform) {
                if ($activeTabs) {
                    if ($tabcolumn = $this->getOption('tabcolumn')) {
                        $tabName = $subform->getElement($tabcolumn)->getValue();
                    } else {
                        $elements = $subform->getElements();
                        $element = reset($elements);
                        $tabName = $element->getValue();
                    }
                    $tabId = $tabName.'-tab';
                    
                    $liOptions = array();
                    $tabPaneOptions = array('id' => $tabId,'class' => 'tab-pane');
                    if ($active && $active == $tabName) {
                        // If a tab is active, select it
                        if (!$useBootstrap) {
                            $js = sprintf('%1$s("#tabElement").tabs({ selected: %2$d});', \ZendX_JQuery_View_Helper_JQuery::getJQueryHandler(), $tabNumber);
                            $jquery->addOnLoad($js);
                        } else {
                            $js = sprintf('%1$s(\'a[data-toggle="tab"]\').eq(%2$d).tab(\'show\');', \ZendX_JQuery_View_Helper_JQuery::getJQueryHandler(), $tabNumber);
                            $jquery->addOnLoad($js);
                        }
                            
                        $liOptions['class'] = 'active';
                        $tabPaneOptions['class'] .= ' active';
                    }
                    $tabNumber++;

                    $list->li($liOptions)->a('#'.$tabId, $tabName, array('role' => 'tab', 'data-toggle' => 'tab'));
                    if ($useBootstrap) {
                        $subContainer = $tabContainerDiv->div($tabPaneOptions);
                    } else {
                        $subContainer = $tabContainerDiv->div($tabPaneOptions)->table(array('class' => 'formTable'));
                    }
                } else {
                    if($useBootstrap) {
                        $subContainer = $tabContainerDiv;
                    } else {
                        $subContainer = $tabContainerDiv->table(array('class' => 'formTable'));
                    }
                }
                foreach ($subform->getElements() as $subelement) {

                    if ($subelement instanceof \Zend_Form_Element_Hidden) {
                        $this->applyDecorators($subelement, array(array('ViewHelper')));
                        $subContainer[] = $subelement;
                    } else {
                        if ($useBootstrap) {
                            $subgroup = $subContainer->div(array('class' => 'form-group'));

                            $label = $subgroup->div(array('class' => 'label-container'))->label(array('for' => $subelement->getId()));
                            $label[] = $subelement->getLabel();

                            $divContainer = $subgroup->div(array('class' => 'element-container'));

                            $divContainer[] = $subelement;
                        } else {
                            $row = $subContainer->tr();
                            $label = $row->td()->label(array('for' => $subelement->getId()));

                            $label[] = $subelement->getLabel();

                            $column = $row->td();
                            $column[] = $subelement;
                        }    
                        
                    }
                }
            }
        }


        $containerDiv->view = $view;
        $html = $containerDiv;

        return $html;
    }
959970
public function render()
    {
        $returnValue = $this->renderLabel();

        $uniqueId = uniqid('calendar_');
        $elementId = tao_helpers_Display::TextCleaner($this->getDescription()) . '_' . $uniqueId;

        if (! isset($this->attributes['size'])) {
            $this->attributes['size'] = 20;
        }

        $returnValue .= "<div class='form-elt-container'><input class='datepicker-input' type='text' name='{$this->name}' id='$elementId' ";
        $returnValue .= $this->renderAttributes();

        if (! empty($this->value)) {
            $timeStamp = is_numeric($this->getRawValue()) ? $this->getRawValue() : $this->getEvaluatedValue();
            $returnValue .= ' value="' . _dh(tao_helpers_Date::displayeDate($timeStamp, tao_helpers_Date::FORMAT_DATEPICKER)) . '"';
        }
        $returnValue .= ' /></div>';

        return (string) $returnValue;
    }
55828
protected function render() : string
    {
        $html = '<div class="progress">';

        foreach ($this->values as $k => $value) {
            $styles = $this->styles($value);
            if (strlen($styles) > 0) {
                $styles = 'style="' . trim($styles) . '"';
            }

            $html .= '<div class="progress-bar' . $this->classes($this->bg_colors[$k]) . '" role="progressbar" ' .
                $styles . ' aria-valuenow="' . $value . '" aria-valuemin="0" aria-valuemax="100"></div>';
        }

        $html .= '</div>';

        return $html;
    }
1356426
public function render() {
    $recursive_iter_iter = $this->getRecursiveIterator();

    $render = [];
    foreach ($recursive_iter_iter as $value) {
      $key = $recursive_iter_iter->key();
      $depth = $recursive_iter_iter->getDepth();

      $indent = str_repeat('  ', $depth);

      if (is_array($value)) {
        $render[] = "$indent'$key' => [";
      }
      else {
        // Quote the value if it's not an expression.
        // WTF, '£' is unicode???
        $first_char = mb_substr($value, 0, 1);
        if (!in_array($first_char, ['£', '\\', '['])) {
          $value = '"' . $value . '"';
        }

        $render[] = "$indent'$key' => $value,";

        if (!$recursive_iter_iter->hasNext() && $depth) {
          $indent = $depth ? str_repeat('  ', $recursive_iter_iter->getDepth() - 1) : '';

          $render[] = "$indent],";
        }
      }
    }

    return $render;
  }