Renders the input file field
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');
    }
563394
def render(self):
        
        start_tag = format_html('<div {}>', mark_safe(' '.join(self.field_attrs)))
        output = [start_tag]
        for widget in self:
            output.append(force_text(widget))
        output.append('</div>')
        return mark_safe('\n'.join(output))
955896
protected void renderInputTagEnd(ResponseWriter rw, SelectBooleanCheckbox selectBooleanCheckbox)
			throws IOException {
		rw.endElement("input");
		String caption = selectBooleanCheckbox.getCaption();
		if (null != caption) {
			if (selectBooleanCheckbox.isEscape()) {
				rw.writeText(" " + caption, null);
			} else {
				rw.append(" " + caption);
			}
		}
		rw.endElement("label");
		rw.endElement("div");
	}
1109958
protected function renderInputForm() {
        $arrTableBody = [];
        
        foreach ($this->config['attributes'] as $attribute) {
            $label = isset($attribute['label'])?$attribute['label']:"";
            $fieldName = isset($attribute['name'])?$attribute['name']:"";
            $value = isset($attribute['default'])?$attribute['default']:"";
            $arrTableBody[] = [
                H::label($label, $fieldName),
                H::input($fieldName, "input", $value),
            ];
        }
        
        $content = H::renderTable([], $arrTableBody)
                 . H::button("Generate Code");
        $output = H::form($_SERVER['REQUEST_URI'], $content);
        $headers = "";
        if (defined('css_headers')) {
            foreach(css_headers as $css) {
                $headers .= H::link("", ["href" => $css, "rel" => "stylesheet"]);
            }
        }
        return H::htmlDocument("Codemonkey", $headers, $output);
    }
464466
public function fileFieldRow($model, $attribute, $htmlOptions = array())
	{
		return $this->inputRow(CiiInput::TYPE_FILE, $model, $attribute, null, $htmlOptions);
	}
382694
function renderKoboField() {
		$this->renderField(
			[
				'id' => 'kobo',
				'name' => $this->getSlug(),
				'option' => 'kobo',
				'value' => ( isset( $this->options['kobo'] ) ) ? $this->options['kobo'] : '',
				'type' => 'url',
				'class' => 'regular-text code',
			]
		);
	}
1063588
public function render()
    {
        if (! empty($this->value)) {
            if (common_Utils::isUri($this->value)) {
                $referencer = $this->getServiceLocator()->get(FileReferenceSerializer::SERVICE_ID);
                /** @var File $file */
                $file = $referencer->unserialize($this->value);
                if (!$file->exists()) {
                    $referencer->cleanup($this->value);
                }
            }
        }
        
        $returnValue = $this->renderLabel();
        $returnValue .= "<input type='hidden' name='MAX_FILE_SIZE' value='" . tao_helpers_form_elements_File::MAX_FILE_SIZE . "' />";
        $returnValue .= "<input type='file' name='{$this->name}' id='{$this->name}' ";
        $returnValue .= $this->renderAttributes();
        $returnValue .= " value='{$this->value}'  />";
        
        return (string) $returnValue;
    }
1079009
public function renderFields()
    {
        $result = '';
        foreach ($this->fields as $field => $value) {
            $result .= '<input type="hidden" name="' . $field . '" value="' . $value . '"/>' . "\r\n";
        }

        return $result;
    }
573894
function renderFile(file, config) {
  const options = Object.assign({file}, config);

  return new Promise((resolve, reject) => {
    sass.render(options, (err, result) => {
      if (err) {
        return reject(err);
      }
      resolve(result.css);
    });
  });
}
1138244
protected function render()
	{
		if (empty($this->getContent())) {
			$parsed = unserialize($this->file->getContent());
			$this->setContent(is_array($parsed) ? $parsed : []);
		}
	}
650157
public function render()
    {
        $this->setupDefaultOptions();

        if (!empty($this->value)) {
            $this->attribute('data-initial-preview', $this->preview());
            $this->attribute('data-initial-caption', $this->initialCaption($this->value));

            $this->setupPreviewOptions();
        }

        $this->options(['overwriteInitial' => true]);

        $options = json_encode($this->options);

        $this->script = <<<EOT

$("input{$this->getElementClassSelector()}").fileinput({$options});

EOT;

        return parent::render();
    }
1280745
public function run()
    {

        list($name, $id) = $this->resolveNameID();

        $this->htmlOptions['id'] = ($this->hasModel() ? get_class($this->model) : 'fileupload') . '-form';

        $this->options['url'] = $this->url;

        $htmlOptions = array();

        if ($this->multiple) {
            $htmlOptions["multiple"] = true;
        }

        $this->render($this->uploadView);
        $this->render($this->downloadView);
        $this->render($this->formView, array('model', $this->model, 'name' => $name, 'htmlOptions' => $htmlOptions));

        if ($this->previewImages || $this->imageProcessing) {
            $this->render($this->previewImagesView);
        }

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

        echo CHtml::openTag($this->tagName, array('id' => 'wrapper-' . $id));

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

        echo CHtml::closeTag($this->tagName);
    }
403326
public function display()
    {
        if (!$this->visible) {
            return;
        }

        parent::display();

        $input_tag = new SwatHtmlTag('input');
        $input_tag->type = 'file';
        $input_tag->name = $this->id;
        $input_tag->id = $this->id;
        $input_tag->class = $this->getCSSClassString();
        $input_tag->accesskey = $this->access_key;
        $input_tag->tabindex = $this->tab_index;
        $input_tag->size = $this->size;

        // note: the 'accept' attribute is part of the w3c standard, but
        //       is ignored by most browsers
        if ($this->accept_mime_types !== null) {
            $input_tag->accept = implode(',', $this->accept_mime_types);
        }

        if (!$this->isSensitive()) {
            $input_tag->disabled = 'disabled';
        }

        $input_tag->display();

        if ($this->display_maximum_upload_size) {
            $div_tag = new SwatHtmlTag('div');
            $div_tag->class = 'swat-note';
            $div_tag->setContent($this->getMaximumUploadSizeText());
            $div_tag->display();
        }
    }
1274901
public function renderView() {
		header('Content-Type: text/csv; charset=utf-8');
		header('Content-Disposition: attachment; filename='.$this->csvFileName);
		$out = fopen('php://output', 'w');
		$csvRows = $this->getViewVariables();
		$firstRow = reset($csvRows);
		if (is_array($firstRow)) {
			$fields = array_keys(reset($firstRow));
			if (is_array($fields)) {
				fputcsv($out, $fields);
				foreach ($csvRows as $rows) {
					foreach ($rows as $row) {
						fputcsv($out, $row);
					}
				}
				fclose($out);
			}
		}
	}
1237368
function render()
    {
        if (!isset($this->result)) {
            $this->usageError('Nothing to render!');
        }

        $baseViewFilePath = dirname(__FILE__).DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'views';

        if (!empty($_SERVER['argv'])) {
            $viewFilename = $baseViewFilePath.DIRECTORY_SEPARATOR.'console'.DIRECTORY_SEPARATOR.'index.php';
        } else {
            $viewFilename = $baseViewFilePath.DIRECTORY_SEPARATOR.'web'.DIRECTORY_SEPARATOR.'index.php';
        }

        $this->renderViewFile($viewFilename, $this->result);
    }
1187242
public function renderWithPhp($input, array $vars, $filename = null)
    {
        return parent::render($input, $vars, $filename);
    }