Render the modal template

@since  1.0.0
@see    \uix\ui\uix
@access public
@return string HTML of modals templates
82
public function modal_template() {

		$output = '<script type="text/html" id="' . esc_attr( $this->id() ) . '-components">';
		foreach ( $this->modals as $modal ) {

			$label         = $modal->struct['label'];
			$data          = $modal->get_data();
			$data_template = $this->drill_in( $data[ $modal->slug ], '{{@root' );
			$modal->set_data( array( $modal->slug => $data_template ) );

			$modal->render();

			$setup = null;
			if ( count( $modal->child ) > 1 ) {
				$setup = ' data-setup="true" ';
			}

			$output .= '<button type="button" class="button uix-component-trigger" style="margin:12px 0 0 12px;" data-label="' . esc_attr( $modal->attributes['data-title'] ) . '" data-type="' . $modal->slug . '" ' . $setup . ' data-id="' . esc_attr( $modal->id() ) . '">' . $label . '</button> ';

		}
		$output .= '</script>';

		return $output;
	}
325660
def render(self):
        
        html = ''
        href = self.view if self.view is not None else self.href
        
        attrs = copy(self.attrs)
        if self.submodal:
            attrs['role'] = "button"
            attrs['data-toggle'] = "remote-submodal"
            if self.data_target:
                if isinstance(self.data_target, basestring):
                    attrs['data-target'] = self.data_target
                else:
                    attrs['data-target'] = "#submodal"
        elif self.modal:
            attrs['role'] = "button"
            #attrs['data-dismiss'] = "modal"
            attrs['data-toggle'] = "modal"
            #attrs['data-submodal'] = "true"
            #attrs['data-remoteinbody'] = "false"
            if self.data_target:
                if isinstance(self.data_target, basestring):
                    attrs['data-target'] = self.data_target
                else:
                    attrs['data-target'] = "#modal"
            
        if self.data_tip:
            attrs['data-tip'] = self.data_tip
        if self.target:
            attrs['target'] = self.target
        if 'css_class' not in attrs:
            attrs['css_class'] = ''
        attrs['css_class'] += ' btn ' + " ".join(self.css)
        attrs = ' '.join(['%s="%s"' % (key if key != 'css_class' else 'class', value) for key,value in attrs.iteritems()])
        
        if href:
            if self.view:
                href = reverse(self.view, args=self.view_args, kwargs=self.view_kwargs)
            if self.next:
                href += '?next=%s' % (self.next if self.next.startswith('/') else reverse(self.next))
            html += '<a href="%s" %s>' % (href, attrs)
        else:
            html += '<button type="button" %s>' % (attrs,)
        
        if hasattr(self.inner, 'render'):
            html += self.inner.render()
        else:
            html += self.inner
        
        if self.title:
            html += self.title
        
        if href:
            html += "</a>"
        else:
            html += "</button>"
        
        return html
467153
public function renderButton()
    {
        if (($button = $this->button) !== false) {
            $tag = ArrayHelper::remove($button, 'tag', 'a');
            $label = ArrayHelper::remove($button, 'label',
                Inflector::camel2words(Inflector::id2camel($this->scenario)));
            if ($tag === 'button' && !isset($button['type'])) {
                $toggleButton['type'] = 'button';
            }

            if ($button['disabled']) {
                $button = ArrayHelper::merge([
                    'onClick' => new JsExpression('return false'),
                ], $button);
            } else {
                $button = ArrayHelper::merge([
                    'data-toggle' => 'modal',
                    'data-target' => "#{$this->getModalId()}",
                ], $button);
            }

            if ($tag === 'a' && empty($button['href'])) {
                $button['href'] = '#';
            }

            echo Html::tag($tag, $label, $button);
        }
    }
262777
public function renderButton()
    {
        if (!empty($this->buttonOptions) && is_array($this->buttonOptions)) {
            TbArray::defaultValue('data-toggle', 'modal', $this->buttonOptions);

            if ($this->remote !== null) {
                $this->buttonOptions['data-remote'] = CHtml::normalizeUrl($this->remote);
            }

            $selector = '#' . $this->htmlOptions['id'];
            $label = TbArray::popValue('label', $this->buttonOptions, 'button');
            $attr = isset($this->buttonOptions['data-remote']) ? 'data-target' : 'href';
            TbArray::defaultValue($attr, $selector, $this->buttonOptions);
            echo TbHtml::button($label, $this->buttonOptions);
        }
    }
640640
public function render() {

		$title = $list = $template = '';

		if ( $this->items ) {

			// If there's title text, format it.
			if ( $this->args['title_text'] ) {

				$title = sprintf(
					'<%1$s class="%2$s">%3$s</%1$s>',
					tag_escape( $this->args['title_tag'] ),
					esc_attr( $this->args['title_class'] ),
					esc_html( $this->args['title_text'] )
				);
			}

			// Loop through each of the items and format each into
			// an HTML string.
			foreach ( $this->items as $item ) {

				$list .= $this->formatItem( $item );
			}

			// Format the list.
			$list = sprintf(
				'<%1$s class="%2$s">%3$s</%1$s>',
				tag_escape( $this->args['list_tag'] ),
				esc_attr( $this->args['list_class'] ),
				$list
			);

			// Format the nav wrapper.
			$template = sprintf(
				'<%1$s class="%2$s" role="navigation">%3$s%4$s</%1$s>',
				tag_escape( $this->args['container_tag'] ),
				esc_attr( sprintf( $this->args['container_class'], $this->context ) ),
				$title,
				$list
			);
		}

		return apply_filters( "hybrid/pagination/{$this->context}", $template, $this->args );
	}
1288055
public function render()
    {
        $renderFunction = function (&$element, $key) {
            $element = $element->render();
        };
        array_walk($this->elements, $renderFunction);

        $structuredElements = StructureManager::buildStructure($this->elements, $this->structure);

        return $structuredElements;
    }
1027890
public function render()
    {
        $this->initRendering();
        $render = $this->getTitle();

        foreach ($this->decorators as $decorator) {
            $render = $decorator->render($render);
        }
        return sprintf('<th %s >%s</th>', $this->getAttributes(), $render);
    }
981757
public function render()
    {
        parent::render();
        $this->_aViewData["menustructure"] = $this->getNavigation()->getDomXml()->documentElement->childNodes;

        return "list_user.tpl";
    }
911977
public function render()
    {
        //~ Transform $this->vars into multiples variables.
        extract($this->vars);

        //~ Include Template as regular php file
        ob_start();
        include $this->fileCompiled;
        $content = ob_get_contents();

        ob_end_clean();

        return $content;
    }
814648
public function render()
    {
        $template_name = $this->base->load->template[0];

        $template_file = configItem('site')['templatedir'] . $template_name . '.tpl';

        if (file_exists($template_file)) {

            $template = $this->twig->loadTemplate($template_name . '.tpl');

            $template_data = array();

            if (isset($this->base->load->template[1]) && is_array($this->base->load->template[1]))
            {
                $template_data = $this->base->load->template[1];

                foreach($template_data as $key => $value)
                {
                    $file = configItem('site')['viewdir'] . $value;

                    if (file_exists($file) && is_file($file))
                    {
                        $template_data[$key] = $this->base->getFileOutput($file);
                        $this->base->logger->info("View parsed - $file");

                    }
                }
            }
            $this->template_markup = $template->render($template_data);

            if(sizeof($this->injections) > 0)
            {
                $this->_applyInjections();
            }
            echo $this->template_markup;

        } else {
            //log error
        }
    }
976173
protected function render(): string
    {
        $html = '<div class="' . $this->classes() . '" role="alert">';
        if ($this->heading !== null) {
            $html .= '<h' . $this->heading_level . ' class="alert-heading">' .
                $this->heading . '</h' . $this->heading_level . '>';
        }
        $html .= $this->message . '</div>';

        return $html;
    }
1023614
public function renderForm()
    {
        $template = $this->path() . DS . 'in.ctp';

        if (!file_exists($template)) {
            user_error(__d('wasabi_cms', 'Template "{0}" for module {1} not found.', $template, $this->name()));
        }

        $viewClass = WasabiCms::getTheme()->getClassNameForInitialization();
        /** @var View $view */
        $view = new $viewClass();
        $output = $view->element('Wasabi/Cms.module', [
            'template' => $template,
            'form' => $this
        ]);

        return $output;
    }
269227
public function modal(Modal\Modal $modal)
    {

        $html = '';

        // header
        if ($modal->hasCloseButton()) {
            $html .= html('button', ['type' => 'button', 'class' => 'close', 'data-dismiss' => 'modal', 'aria-label' => $modal->getCloseButtonLabel()], '<span aria-hidden="true">&times;</span>');
        }

        if ($modal->hasTitle()) {
            $html .= html('h4', ['class' => Style::MODAL_HEADER_TITLE_CLASS], $modal->getTitle());
            $html = html('div', ['class' => Style::MODAL_HEADER_CLASS], $html);
        }

        // body
        $html .= html('div', ['class' => Style::MODAL_BODY_CLASS], $modal->getBody());

        // footer
        if ($modal->hasActions()) {

            $actions = '';

            if ($modal->hasCloseButton()) {
                $actions .= html('button', ['type' => 'button', 'class' => 'btn btn-default', 'data-dismiss' => 'modal'], $modal->getCloseButtonLabel());
            }

            foreach ($modal->getActions() as $action) {
                /** @var Element\Button $action */
                $actions .= $this->render('action', $action);
            }

            $html .= html('div', ['class' => Style::MODAL_FOOTER_CLASS], $actions);
        }

        // container
        if (!$modal->isRemote()) {
            $html = html('div', ['class' => Style::MODAL_CONTENT_CLASS, ], $html);
            $html = html('div', ['class' => Style::MODAL_DIALOG_CLASS, 'role' => 'document'], $html);
            $html = html('div', ['class' => Style::MODAL_CLASS,'role' => 'dialog'], $html);
        }

        $html .= html('script', ['type' => 'text/javascript'],js('onload'));

        return $html;
    }
96019
public function render()
    {
        // Get an array of formatted data for Former checkboxes
        $boxes = [];
        foreach ($this->getRelations() as $row) {
            $boxes[$this->generateBoxLabel($row)] = $this->generateBox($row);
        }

        // Render the checkboxes, adding a hidden field after the set so that if
        // all boxes are un-checked, an empty value will be sent
        if (count($boxes)) {
            $this->checkboxes($boxes);

            return parent::render().HtmlInput::hidden($this->boxName());

        }

        // There are no relations yet, show a message to that effect
        return '<span class="glyphicon glyphicon-info-sign"></span>
            You have not <a href="/admin/'.Str::snake($this->name, '-').'">created</a>
            any <b>'.ucfirst($this->label_text).'</b>.';
    }
101679
public function render() {

		$output = '<div id="' . esc_attr( $this->id() ) . '" class="uix-control uix-control-' . esc_attr( $this->type ) . ' ' . esc_attr( $this->id() ) . '">';

		$output .= $this->label();
		$output .= '<div class="uix-control-input">';
		$output .= $this->input();
		$output .= '</div>';
		$output .= $this->description();

		$output .= '</div>';

		return $output;
	}
1162830
public function render()
	{
		$html = array();

		// Start toolbar div.
		$html[] = '<div class="toolbar-list" id="' . $this->_name . '">';
		$html[] = '<ul>';

		foreach ($this->_bar as $key => $button)
		{
			$this->_bar[$key][9] = array();
			if ($button[0] == 'Separator')
			{
				continue;
			}
			if (!isset($this->_bar[$key - 1]) || $this->_bar[$key - 1][0] == 'Separator')
			{
				$this->_bar[$key][9][] = 'first';
			}
			if (!isset($this->_bar[$key + 1]) || $this->_bar[$key + 1][0] == 'Separator')
			{
				$this->_bar[$key][9][] = 'last';
			}
		}

		// Render each button in the toolbar.
		foreach ($this->_bar as $button)
		{
			$html[] = $this->renderButton($button);
		}

		// End toolbar div.
		$html[] = '</ul>';
		$html[] = '</div>';

		return implode("\n", $html);
	}
1294020
public function render()
    {
        if ($this->help instanceof Group\Help) {
            foreach ($this->childNodes as $childNode) {
                if ($childNode instanceof Elements\Input or
                    $childNode instanceof Elements\Checkbox or
                    $childNode instanceof Elements\Select or
                    $childNode instanceof Elements\Textarea
                ) {
                    if (false !== ($attributeId = $childNode->attributes->getAttributeId())) {
                        $this->help->attributes->setAttributeId('help-' . $attributeId);
                        $childNode->attributes->addAttribute('aria-describedby', 'help-' . $attributeId);
                    }
                }
            }
        }

        return parent::render();
    }