Render the field.

@access public
@return mixed|string
1694
public function render()
	{
		switch ($this->getContext()) {
			case BaseField::CONTEXT_LIST:
				return '<img src="' . asset($this->getValue()). '" width="10%">';
				break;
			case BaseField::CONTEXT_FILTER:
			case BaseField::CONTEXT_FORM:
				return View::make('krafthaus/bauhaus::models.fields._image')
					->with('field', $this);
				break;
		}
	}
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);
    }
368093
public function render()
    {
        Admin::script($this->script());

        $options = $this->getOptions()->map(function ($option) {
            $selected = ($option == $this->perPage) ? 'selected' : '';
            $url = app('request')->fullUrlWithQuery([$this->perPageName => $option]);

            return "<option value=\"$url\" $selected>$option</option>";
        })->implode("\r\n");

        $trans = [
            'show'    => trans('admin.show'),
            'entries' => trans('admin.entries'),
        ];

        return <<<EOT

<label class="control-label pull-right" style="margin-right: 10px; font-weight: 100;">

        <small>{$trans['show']}</small>&nbsp;
        <select class="input-sm {$this->grid->getPerPageName()}" name="per-page">
            $options
        </select>
        &nbsp;<small>{$trans['entries']}</small>
    </label>

EOT;
    }
852279
public function renderField()
    {
        list($name, $id) = $this->resolveNameID();

        TbArray::defaultValue('id', $id, $this->htmlOptions);
        TbArray::defaultValue('name', $name, $this->htmlOptions);

        if ($this->useHelperSelectBox) {
            $select = Yii::createComponent(
                CMap::mergeArray(
                    $this->helperOptions,
                    array(
                        'class' => 'yiiwheels.widgets.formhelpers.WhSelectBox',
                        'htmlOptions' => $this->htmlOptions,
                        'model' => $this->model,
                        'attribute' => $this->attribute,
                        'name' => $this->name,
                        'value' => $this->value,
                        'wrapperOptions' => array(
                            'class' => 'bfh-fonts',
                            'data-family' => $this->hasModel() ? $this->model->{$this->attribute} : $this->value,
                        )
                    )
                )
            );
            $select->init();
            $select->run();
        } else {
            $this->htmlOptions['data-family'] = $this->hasModel()
                ? $this->model->{$this->attribute}
                : $this->value;

            if ($this->hasModel()) {
                echo CHtml::activeDropDownList($this->model, $this->attribute, array(), $this->htmlOptions);
            } else {
                echo CHtml::dropDownList($name, $this->value, array(), $this->htmlOptions);
            }
        }
    }
775643
public function render(): string
    {
        return $this->renderTable() . $this->renderPk() . $this->renderIndexes() . $this->renderForeignKeys() . "\n";
    }
1151731
public function render()
    {
        $this->tag = '<' . $this->name;

        if (count($this->attr)) {
            $this->tag .= ' ';
            foreach ($this->attr as $key => $value) {
                $this->tag .= $key . '="';
                if (is_array($value)) {
                    $this->tag .= implode(' ', $value);
                } else {
                    $this->tag .= $value != false? $value: 0;
                }
                $this->tag .= '" ';
            }
        }
        $this->tag = trim($this->tag) . '>';

        if (!in_array(strtolower($this->name), $this->elementsNoClosing)) {
            $this->tag .= $this->parseValue($this->value) . '</' . $this->name . '>';
        }

        return $this->tag;
    }
944650
private function render()
    {
        if (empty($this->element)) {
            $this->textInput();
        }
        
        if (!isset($this->parts['{label}'])) {
            $this->label($this->label);
        }
        
        if (!isset($this->parts['{initValue}'])) {
            $this->initValue(null);
        }
    
        return str_replace([
            '{label}', '{initValue}', '{model}',
        ], [
            $this->parts['{label}'],
            $this->parts['{initValue}'],
            $this->getNgModel(),
        ], $this->element);
    }
1053686
public function render()
    {
        $name = $this->getName();
        if ($this->hasArgument('multiple')) {
            $name .= '[]';
        }

        $this->tag->addAttribute('name', $name);

        $options = $this->getOptions();
        $this->tag->setContent($this->renderOptionTags($options));

        $this->addAdditionalIdentityPropertiesIfNeeded();
        $this->setErrorClassAttribute();

        // register field name for token generation.
        // in case it is a multi-select, we need to register the field name
        // as often as there are elements in the box
        if ($this->hasArgument('multiple') && $this->arguments['multiple'] !== '') {
            $this->renderHiddenFieldForEmptyValue();
            for ($i = 0; $i < count($options); $i++) {
                $this->registerFieldNameForFormTokenGeneration($name);
            }
        } else {
            $this->registerFieldNameForFormTokenGeneration($name);
        }

        return $this->tag->render();
    }
93369
public function renderField()
    {
        list($name, $id) = $this->resolveNameID();

        if ($this->hasModel()) {
            echo CHtml::activeHiddenField($this->model, $this->attribute, $this->htmlOptions);
        } else {
            echo CHtml::hiddenField($name, $this->value, $this->htmlOptions);
        }

        echo '<div id="slider_' . $id . '"></div>';
    }
543142
public function renderField()
    {
        list($name, $id) = $this->resolveNameID();

        TbArray::defaultValue('id', $id, $this->htmlOptions);
        TbArray::defaultValue('name', $name, $this->htmlOptions);

        TbHtml::addCssClass('bfh-selectbox', $this->wrapperOptions);
        echo CHtml::openTag('div', $this->wrapperOptions);
        if ($this->hasModel()) {
            echo CHtml::activeHiddenField($this->model, $this->attribute, $this->htmlOptions);
            $value = $this->model->{$this->attribute};
            $valueText = $value && isset($this->data[$value]) ? $this->data[$value] : '&nbsp;';
        } else {
            echo CHtml::hiddenField($name, $this->value, $this->htmlOptions);
            $value = $this->value;
            $valueText = $value && isset($this->data[$value]) ? $this->data[$value] : '&nbsp;';
        }

        echo CHtml::openTag(
            'a',
            array(
                'class' => 'bfh-selectbox-toggle',
                'role' => 'button',
                'data-toggle' => 'bfh-selectbox',
                'href' => '#'
            )
        );
        echo CHtml::tag(
            'span',
            array('class' => 'bfh-selectbox-option ' . $this->size, 'data-option' => $value),
            $valueText
        );
        echo CHtml::tag('b', array('class' => 'caret'), '&nbsp;');
        echo CHtml::closeTag('a');

        echo CHtml::openTag('div', array('class' => 'bfh-selectbox-options'));
        if ($this->displayFilter) {
            echo '<input type="text" class="bfh-selectbox-filter">';
        }
        $items = array();
        foreach ($this->data as $key => $item) {
            $items[] = CHtml::tag('a', array('tabindex' => '-1', 'href' => '#', 'data-option' => $key), $item);
        }
        echo CHtml::tag('ul', array('role' => 'options'), '<li>' . implode('</li><li>', $items) . '</li>');
        echo CHtml::closeTag('div');

        echo CHtml::closeTag('div');
    }
1347644
public function renderField()
    {
        if (null === $this->selector) {
            list($name, $id) = $this->resolveNameID();

            if ($this->hasModel()) {
                echo TbHtml::activeTextField($this->model, $this->attribute, $this->htmlOptions);
            } else {
                echo TbHtml::textField($name, $this->value, $this->htmlOptions);
            }

            $this->setLocaleSettings();
        }
    }
1126606
public function renderFields()
    {
        // Save fields in DB
        $this->saveFields();

        // Get contents
        $pageCurrent = $this->currentPage;
        $sectionCurrent = $this->currentSection;
        $formFields = $this->fields;
        $contentOptions = $this->options;

        // Get links
        $u_link = 'page='.$pageCurrent;
        $u_section = !empty($sectionCurrent) ? '&section='.$sectionCurrent : '';

        // Work on vars
        $vars = [
            'title'         => $contentOptions['title'],
            'description'   => $contentOptions['description'],
            'submit'        => $contentOptions['submit'],

            // Texts and URLs
            't_submit'      => Translate::t('adminpage.submit'),
            'u_link'        => $u_link,
            'u_action'      => admin_url('admin.php?'.$u_link.$u_section),
        ];

        // Display sections
        if (!empty($contentOptions['sections']) && is_array($contentOptions['sections'])) {
            foreach ($contentOptions['sections'] as $slug => $opts) {
                // Update option
                $opts['slug'] = $slug;
                $opts['u_link'] = admin_url('admin.php?'.$u_link.'&section='.$slug);

                // Update vars
                $vars['sections'][] = $opts;

                if ($slug !== $sectionCurrent) {
                    continue;
                }

                // Update vars
                $vars['submit'] = $opts['submit'];
            }
        }

        // Work on current vars
        $vars['c_page'] = $pageCurrent;
        $vars['c_section'] = $sectionCurrent;

        // Display fields
        if (!empty($formFields)) {
            foreach ($formFields as $field) {
                if (!$field) {
                    continue;
                }

                $vars['fields'][] = $field->render([], [
                    'template' => 'adminpage',
                ], false);
            }
        }

        // Render view
        Render::view('adminpage.html.twig', $vars, 'adminpage');
    }
817935
public function render_field($field)
    {
        /*
        *  Review the data of $field.
        *  This will show what data is available
        */

        /**
         * TODO
         *
         * => Render out icons within the select options
         */


        //echo '<pre>';
        //print_r($field);
        //echo '</pre>';

        if (!is_array($this->dropdownOptions($field)) || empty($this->dropdownOptions($field))) {
            return;
        }

        $output = '';

        $output .= '<select class="c-pricons-dropdown" name="' . $field['name'] . '">';

        if ($field['value'] == "") {
            $output .= '<option class="c-pricons-dropdown__option" value="" selected>Select an icon</option>';
        } else {
            $output .= '<option class="c-pricons-dropdown__option" value="">Select an icon</option>';
        }


        foreach ($this->dropdownOptions($field) as $value => $label) {
            if ($value == $field['value']) {
                $output .= '<option class="c-pricons-dropdown__option" value="' . $value . '" selected>' . $label . '</option>';
            } else {
                $output .= '<option class="c-pricons-dropdown__option" value="' . $value . '">' . $label . '</option>';
            }
        }

        $output .= '</select>';

        echo $output;
    }
807950
public function renderSearchField()
    {
        if ($this->attributeKey !== null) {
            $type = $this->attributeKey->getAttributeType();
            $cnt = $type->getController();
            $cnt->setRequestArray($this->data);
            $cnt->setAttributeKey($this->attributeKey);
            $view = new View($this->attributeKey);
            $view->controller = $cnt;

            return $view->render(new BasicSearchContext());
        }
    }
1213880
public function render(): string
    {
        $view = $this->viewFactory->make($this->getView(), $this->getFieldData());

        // Indicates that the form has been rendered at least once.
        // Then return its content.
        $this->rendered = true;

        return $view->render();
    }
455553
protected function render()
    {
        if ($this->mobile !== null || $this->tablet !== null) {
            if (($this->mobile === false && Container::getDevice()->isMobile())
            ||  ($this->tablet === false && Container::getDevice()->isMobileOrTablet())) {
                return '';
            }
            if (($this->mobile === true && !Container::getDevice()->isMobile())
            ||  ($this->tablet === true && !Container::getDevice()->isMobileOrTablet())) {
                $this->addCssClass('visible-xs-inline');
            }
            else if (($this->mobile === false || $this->tablet === false) 
            &&  !Container::getDevice()->isMobileOrTablet()) {
                $this->addCssClass('hidden-xs');
            }
        }
        $this->content .= $this->getHtml();
        $this->lines = [];
        if ($this->mobileCrop && $this->mobileCrop !== self::CROP_AUTO) {
            $croppedContent = T::crop($this->content, $this->mobileCrop);
            if (Container::getDevice()->isMobile()) {
                $content = $this->escape ? $this->esc($croppedContent) : $croppedContent;
                unset($croppedContent);
            } else {
                $content = $this->escape ? $this->esc($this->content) : $this->content;
                $this->addCssClass('hidden-xs');
                $croppedContent = $this->escape ? $this->esc($croppedContent) : $croppedContent;
            }
        }
        if (!isset($content)) {
            $content = $this->escape ? $this->esc($this->content) : $this->content;
        }
        if ($this->mobileCrop === self::CROP_AUTO) {
            $this->addCssClass('text-overflow');
        }
        $this->setAttributes($this->getTooltipAttributes());
        $this->setAttributes($this->getPopoverAttributes());
        $this->addCssClasses($this->getMenuCssClasses());
        $this->setAttributes($this->getMenuAttributes());
        $menuOrientation = $this->menu ? ' ' . $this->menu->getOrientationClass() : '';
        if (!$this->elt && $this->getAttributes()) {
            $this->setElement('span');
        }
        $this->elt !== '' && $this->html('<' . $this->elt . $this->getEltDecorationStr() . '>');
        $this->html($content);
        $this->elt !== '' && $this->html('</' . $this->elt . '>');
        if (isset($croppedContent)) {
            $this->removeCssClass('hidden-xs');
            $this->addCssClass('visible-xs-inline');
            $this->html('<' . $this->elt . $this->getEltDecorationStr() . '>');
            $this->html($croppedContent);
            $this->html('</' . $this->elt . '>');
        }
        $html = $this->getHtml();
        if ($this->menu) {
            $html = $this
                ->html('<div class="inline dropdown clickable' . $menuOrientation . '">')
                ->html($html)
                ->html((string) $this->menu)
                ->html('</div>')
                ->getHtml();
        }
        
        return $html;
    }
210643
public function render()
    {
        return $this->renderName()
        . $this->renderSource()
        . $this->renderMedium()
        . $this->renderKeyword()
        . $this->renderContent()
        . $this->renderId();
    }