Renders the field.
559580
def as_widget(self, widget=None, attrs=None, only_initial=False):
        
        if not widget:
            widget = self.field.widget

        if DJANGO_VERSION > (1, 10):
            # so that we can refer to the field when building the rendering context
            widget._field = self.field
            # Make sure that NgWidgetMixin is not already part of the widget's bases so it doesn't get added twice.
            if not isinstance(widget, NgWidgetMixin):
                widget.__class__ = type(widget.__class__.__name__, (NgWidgetMixin, widget.__class__), {})
        return super(NgBoundField, self).as_widget(widget, attrs, only_initial)
861079
public function render()
    {
        if ($this->report->fireEvent("OnBeforeWidgetRender", $this)) {
            $type=str_replace('\\', '/', get_class($this));
            echo "<krwidget widget-name='$this->name' widget-type='$type'"
                .($this->themeCssClass?" class='$this->themeCssClass'":"").">";
            $this->onRender();
            echo "</krwidget>";
        }
        $this->report->fireEvent("OnWidgetRender", $this);
    }
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');
    }
1256182
def render_field(field):
    
    field = field.field if isinstance(field, forms.BoundField) else field
    validators = {}

    def no_compare_validator():
        return not ('lessThan' in validators or 'greaterThan' in validators or 'between' in validators)

    if field.required:
        validators['notEmpty'] = {}
    validator_codes = [item.code for item in field.validators]
    for v in field.validators:
        if isinstance(v, MinLengthValidator):
            vc = validators.get('stringLength', {})
            vc['min'] = field.min_length
            validators.update({'stringLength': vc})
        elif isinstance(v, MaxLengthValidator):
            vc = validators.get('stringLength', {})
            vc['max'] = field.max_length
            validators.update({'stringLength': vc})
        elif isinstance(v, (MinValueValidator, MaxValueValidator)):
            if 'min_value' in validator_codes and 'max_value' in validator_codes:
                vc = validators.get('between', {})
                if v.code == 'min_value':
                    vc['min'] = field.min_value
                else:
                    vc['max'] = field.max_value
                validators.update({'between': vc})
            elif v.code == 'min_value':
                validators['greaterThan'] = {'value': field.min_value}
            elif v.code == 'max_value':
                validators['lessThan'] = {'value': field.max_value}
        elif isinstance(v, BaseBV):
            validators.update(v.get_validator_code())

    if isinstance(field, (fields.DecimalField, fields.FloatField)) and no_compare_validator():
        validators['numeric'] = {}
    elif isinstance(field, fields.IntegerField) and no_compare_validator():
        validators['integer'] = {}
    elif isinstance(field, (fields.DateField, fields.DateTimeField)):
        formats = field.input_formats
        if formats:
            validators['date'] = {'format': convert_datetime_python_to_javascript(formats[0])}
    elif isinstance(field, fields.TimeField):
        validators['regexp'] = {'regexp': '^((([0-1]?[0-9])|([2][0-3])):)(([0-5][0-9]):)([0-5][0-9])$',
        }
    elif isinstance(field, fields.URLField):
        validators['uri'] = {}
    elif isinstance(field, fields.EmailField):
        validators['emailAddress'] = {}
    elif isinstance(field, fields.ImageField):
        if 'file' not in validators:
            validators.update(ImageFileValidator().get_validator_code())
    return {'validators': validators}
1190665
public function renderSearchField()
    {
        $app = Facade::getFacadeApplication();
        $selectedLocale = null;
        if (isset($this->data['localeID']) && $this->data['localeID'] !== '') {
            $em = $app->make(EntityManager::class);
            $selectedLocale = $em->find(Locale::class, $this->data['localeID']);
        }
        $site = $app->make('site')->getActiveSiteForEditing();
        $selector = new SiteLocaleSelector();
        print $selector->selectLocale('localeID', $site, $selectedLocale);
    }
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;
		}
	}
418513
public function render()
    {
        $fieldKey = $this->arguments['fieldKey'];
        $elementKey = $this->arguments['elementKey'];
        $evalValue = $this->arguments['evalValue'];

        $this->generalUtility = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('MASK\\Mask\\Utility\\GeneralUtility');
        $this->fieldHelper = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('MASK\\Mask\\Helper\\FieldHelper');

        $type = $this->fieldHelper->getFieldType($fieldKey, $elementKey);
        return $this->generalUtility->isBlindLinkOptionSet($fieldKey, $evalValue, $type);
    }
403271
function renderOtherServiceField() {
		$this->renderField(
			[
				'id' => 'otherservice',
				'name' => $this->getSlug(),
				'option' => 'otherservice',
				'value' => ( isset( $this->options['otherservice'] ) ) ? $this->options['otherservice'] : '',
				'type' => 'url',
				'class' => 'regular-text code',
			]
		);
	}
4832
public function render()
    {
        echo '<!DOCTYPE html>', $this->html->value($this->head)->value($this->body)->render();
    }
136137
public function render()
    {
        $this->output->writeln(array(
            '',
            sprintf('<title>%s</>', $this->message),
            sprintf('<title>%s</>', str_repeat('=', Helper::strlenWithoutDecoration($this->output->getFormatter(), $this->message))),
            '',
        ));
    }
543639
def render(self):
        '''
        
        '''
        data = self.prepare_data()
        if self.field.readable:
            return self.env.template.render(self.template, **data)
        return ''
642254
function renderAmazonField() {
		$this->renderField(
			[
				'id' => 'amazon',
				'name' => $this->getSlug(),
				'option' => 'amazon',
				'value' => ( isset( $this->options['amazon'] ) ) ? $this->options['amazon'] : '',
				'type' => 'url',
				'class' => 'regular-text code',
			]
		);
	}
1316244
public function render()
    {
        $exception_context = array(
            'type'=> get_called_class(),
            'code'=> $this->getCode(),
            'message'=>$this->getMessage(),
            'line'=>$this->getLine(),
            'file'=>$this->getFile(),
        );
        $this->webservices->log(
            $this->webservices->getOption('error_log_mask'), $exception_context, Logger::ERROR
        );
        $this->webservices->getResponse()
            ->addContent('error', $exception_context);
        $this->webservices->display();
    }
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;
    }
133572
public function render()
    {
        parent::render();

        $sOxId = $this->_aViewData["oxid"] = $this->getEditObjectId();

        //create empty edit object
        $this->_aViewData["edit"] = oxNew(\OxidEsales\Eshop\Application\Model\SelectList::class);

        if (isset($sOxId) && $sOxId != "-1") {
            // generating category tree for select list
            // A. hack - passing language by post as lists uses only language passed by POST/GET/SESSION
            $_POST["language"] = $this->_iEditLang;
            $this->_createCategoryTree("artcattree", $sOxId);

            // load object
            $oAttr = oxNew(\OxidEsales\Eshop\Application\Model\SelectList::class);
            $oAttr->loadInLang($this->_iEditLang, $sOxId);

            $aFieldList = $oAttr->getFieldList();
            if (is_array($aFieldList)) {
                foreach ($aFieldList as $key => $oField) {
                    if ($oField->priceUnit == '%') {
                        $oField->price = $oField->fprice;
                    }
                }
            }

            $oOtherLang = $oAttr->getAvailableInLangs();
            if (!isset($oOtherLang[$this->_iEditLang])) {
                // echo "language entry doesn't exist! using: ".key($oOtherLang);
                $oAttr->loadInLang(key($oOtherLang), $sOxId);
            }
            $this->_aViewData["edit"] = $oAttr;

            // Disable editing for derived items.
            if ($oAttr->isDerived()) {
                $this->_aViewData['readonly'] = true;
            }

            // remove already created languages
            $aLang = array_diff(\OxidEsales\Eshop\Core\Registry::getLang()->getLanguageNames(), $oOtherLang);
            if (count($aLang)) {
                $this->_aViewData["posslang"] = $aLang;
            }

            foreach ($oOtherLang as $id => $language) {
                $oLang = new stdClass();
                $oLang->sLangDesc = $language;
                $oLang->selected = ($id == $this->_iEditLang);
                $this->_aViewData["otherlang"][$id] = clone $oLang;
            }

            $iErr = \OxidEsales\Eshop\Core\Registry::getSession()->getVariable("iErrorCode");

            if (!$iErr) {
                $iErr = ERR_SUCCESS;
            }

            $this->_aViewData["iErrorCode"] = $iErr;
            \OxidEsales\Eshop\Core\Registry::getSession()->setVariable("iErrorCode", ERR_SUCCESS);
        }
        if (\OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter("aoc")) {
            $oSelectlistMainAjax = oxNew(\OxidEsales\Eshop\Application\Controller\Admin\SelectListMainAjax::class);
            $this->_aViewData['oxajax'] = $oSelectlistMainAjax->getColumns();

            return "popups/selectlist_main.tpl";
        }

        return "selectlist_main.tpl";
    }
871478
def render_field_and_label(
    field, label, field_class="", label_for=None, label_class="", layout="", **kwargs
):
    
    if layout == "horizontal":
        if not label_class:
            label_class = get_bootstrap_setting("horizontal_label_class")
        if not field_class:
            field_class = get_bootstrap_setting("horizontal_field_class")
        if not label:
            label = mark_safe("&#160;")
        label_class = add_css_class(label_class, "control-label")
    html = field
    if field_class:
        html = '<div class="{klass}">{html}</div>'.format(klass=field_class, html=html)
    if label:
        html = render_label(label, label_for=label_for, label_class=label_class) + html
    return html
976294
public function render()
    {
        if (!$this->visible) {
            return;
        }

        parent::render();

        if ($this->value === null && $this->null_display_value !== null) {
            $this->renderNullValue();
        } else {
            echo $this->getDisplayValue();
        }
    }