Render rest of the form.

@param bool $showFormEnd
@param bool $showFields
@return string
502641
public function renderRest($showFormEnd = true, $showFields = true)
    {
        $fields = $this->getUnrenderedFields();

        return $this->render([], $fields, false, $showFields, $showFormEnd);
    }
78660
public function render()
    {
        $this->getEventManager()->trigger(
            'formBeforeRender',
            $this,
            array(

            )
        );
        $output = parent::render();
        $this->getEventManager()->trigger(
            'formAfterRender',
            $this,
            array(
                'output' => &$output
            )
        );
        return $output;
    }
99061
public function render()
    {
        $elementKey = $this->arguments['elementKey'];
        $fieldKey = $this->arguments['fieldKey'];
        $type = $this->arguments['type'];

        $this->fieldHelper = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('MASK\\Mask\\Helper\\FieldHelper');
        $formType = $this->fieldHelper->getFormType($fieldKey, $elementKey, $type);
        return $formType;
    }
799317
public function event(calendar_event $event, $showactions=true) {
        global $CFG;

        $event = calendar_add_event_metadata($event);
        $context = $event->context;
        $output = '';

        $output .= $this->output->box_start('card-header clearfix');
        if (calendar_edit_event_allowed($event) && $showactions) {
            if (calendar_delete_event_allowed($event)) {
                $editlink = new moodle_url(CALENDAR_URL.'event.php', array('action' => 'edit', 'id' => $event->id));
                $deletelink = new moodle_url(CALENDAR_URL.'delete.php', array('id' => $event->id));
                if (!empty($event->calendarcourseid)) {
                    $editlink->param('course', $event->calendarcourseid);
                    $deletelink->param('course', $event->calendarcourseid);
                }
            } else {
                $params = array('update' => $event->cmid, 'return' => true, 'sesskey' => sesskey());
                $editlink = new moodle_url('/course/mod.php', $params);
                $deletelink = null;
            }

            $commands  = html_writer::start_tag('div', array('class' => 'commands pull-xs-right'));
            $commands .= html_writer::start_tag('a', array('href' => $editlink));
            $str = get_string('tt_editevent', 'calendar');
            $commands .= $this->output->pix_icon('t/edit', $str);
            $commands .= html_writer::end_tag('a');
            if ($deletelink != null) {
                $commands .= html_writer::start_tag('a', array('href' => $deletelink));
                $str = get_string('tt_deleteevent', 'calendar');
                $commands .= $this->output->pix_icon('t/delete', $str);
                $commands .= html_writer::end_tag('a');
            }
            $commands .= html_writer::end_tag('div');
            $output .= $commands;
        }
        if (!empty($event->icon)) {
            $output .= $event->icon;
        } else {
            $output .= $this->output->spacer(array('height' => 16, 'width' => 16));
        }

        if (!empty($event->referer)) {
            $output .= $this->output->heading($event->referer, 3, array('class' => 'referer'));
        } else {
            $output .= $this->output->heading(
                format_string($event->name, false, array('context' => $context)),
                3,
                array('class' => 'name d-inline-block')
            );
        }
        // Show subscription source if needed.
        if (!empty($event->subscription) && $CFG->calendar_showicalsource) {
            if (!empty($event->subscription->url)) {
                $source = html_writer::link($event->subscription->url,
                        get_string('subscriptionsource', 'calendar', $event->subscription->name));
            } else {
                // File based ical.
                $source = get_string('subscriptionsource', 'calendar', $event->subscription->name);
            }
            $output .= html_writer::tag('div', $source, array('class' => 'subscription'));
        }
        if (!empty($event->courselink)) {
            $output .= html_writer::tag('div', $event->courselink);
        }
        if (!empty($event->time)) {
            $output .= html_writer::tag('span', $event->time, array('class' => 'date pull-xs-right mr-1'));
        } else {
            $attrs = array('class' => 'date pull-xs-right mr-1');
            $output .= html_writer::tag('span', calendar_time_representation($event->timestart), $attrs);
        }

        if (!empty($event->actionurl)) {
            $actionlink = html_writer::link(new moodle_url($event->actionurl), $event->actionname);
            $output .= html_writer::tag('div', $actionlink, ['class' => 'action']);
        }

        $output .= $this->output->box_end();
        $eventdetailshtml = '';
        $eventdetailsclasses = '';

        $eventdetailshtml .= format_text($event->description, $event->format, array('context' => $context));
        $eventdetailsclasses .= 'description card-block';
        if (isset($event->cssclass)) {
            $eventdetailsclasses .= ' '.$event->cssclass;
        }

        if (!empty($eventdetailshtml)) {
            $output .= html_writer::tag('div', $eventdetailshtml, array('class' => $eventdetailsclasses));
        }

        $eventhtml = html_writer::tag('div', $output, array('class' => 'card'));
        return html_writer::tag('div', $eventhtml, array('class' => 'event', 'id' => 'event_' . $event->id));
    }
1004960
public function render(Form $form, $mode = null) {
		$form->getElementPrototype()->addClass("form-horizontal");
		
		foreach($form->getControls() as $control) {
			if($control instanceof Checkbox || $control instanceof CheckboxList || $control instanceof RadioList) {
				$control->getSeparatorPrototype()->setName(null);
			}
			if($control instanceof Checkbox) {
				$control->getLabelPrototype()->addClass("checkbox-inline");
			}
			if($control instanceof CheckboxList) {
				$control->getItemLabelPrototype()->addClass("checkbox-inline");
			}
			if($control instanceof RadioList) {
				$control->getItemLabelPrototype()->addClass("radio-inline");
			}
			if($control instanceof TextBase || $control instanceof SelectBox || $control instanceof MultiSelectBox) {
				$control->getControlPrototype()->addClass("form-control");
			}
			if($control instanceof TextArea) {
				$control->getControlPrototype()->setAttribute("rows", 4);
			}
		}
		
		return parent::render($form, $mode);
	}
151872
public function renderBegin()
	{
		foreach ($this->form->getControls() as $control) {
			$control->setOption(RendererOptions::_rendered, FALSE);
		}

		$prototype = $this->form->getElementPrototype();
		$prototype = $this->configElem('form', $prototype);

		if ($this->form->isMethod('get')) {
			$el = $prototype;
			/** @noinspection PhpUndefinedFieldInspection */
			$query = parse_url($el->action, PHP_URL_QUERY);
			/** @noinspection PhpUndefinedFieldInspection */
			$el->action = str_replace("?$query", '', $el->action);
			$s = '';
			foreach (preg_split('#[;&]#', $query, NULL, PREG_SPLIT_NO_EMPTY) as $param) {
				$parts = explode('=', $param, 2);
				$name = urldecode($parts[0]);
				if (!isset($this->form[ $name ])) {
					$s .= Html::el('input', ['type' => 'hidden', 'name' => $name, 'value' => urldecode($parts[1])]);
				}
			}

			return $el->startTag() . "\n$s";
		} else {
			return $prototype->startTag();
		}
	}
123161
private function renderMain($form)
	{
		// #main .content
		echo CHtml::openTag('div', array('id' => 'main', 'class' => 'nano'));
			echo CHtml::openTag('div', array('class' => 'nano-content'));

				echo CHtml::openTag('fieldset');

					// If we want a custom form view, render that view instead of the default behavior
					if ($this->model->form !== NULL)
						$this->controller->renderPartial($this->model->form, array('model' => $this->model, 'properties' => $this->properties, 'form' => $form));
					else if (count($this->properties) == 0)
					{
						echo CHtml::tag('legend', array(), Yii::t('Dashboard.main', 'Change Theme Settings'));
						echo CHtml::tag('div', array('class' => 'alert alert-info'), Yii::t('Dashboard.main', 'There are no settings for this section.'));
					}
					else
					{
						$groups = $this->model->groups();

						if (!empty($groups))
						{
							foreach ($groups as $name=>$attributes)
							{
								echo CHtml::tag('legend', array(), $name);
								echo CHtml::tag('div', array('class' => 'clearfix'), NULL);
								foreach ($attributes as $property)
								{
									$p = new StdClass();
									$p->name = $property;
									$this->renderProperties($form, $p);
								}
							}
						}
						else
						{
							echo CHtml::tag('legend', array(), CiiInflector::titleize(get_class($this->model)));
							foreach ($this->properties as $property)
							{
								$this->renderProperties($form, $property);
							}
						}
					}

				echo CHtml::closeTag('div');
			echo CHtml::closeTag('div');
		echo CHtml::closeTag('div');
	}
949091
public function view_summary(stdClass $submission, & $showviewlink) {

        // Never show a link to view full submission.
        $showviewlink = false;
        // Need to used this init() otherwise it does not have the javascript includes.
        comment::init();

        $options = new stdClass();
        $options->area    = 'submission_comments';
        $options->course    = $this->assignment->get_course();
        $options->context = $this->assignment->get_context();
        $options->itemid  = $submission->id;
        $options->component = 'assignsubmission_comments';
        $options->showcount = true;
        $options->displaycancel = true;

        $comment = new comment($options);

        $o = $this->assignment->get_renderer()->container($comment->output(true), 'commentscontainer');
        return $o;
    }
1291721
private function renderForm(Form $form) : string
    {
        $html = '';

        foreach ($form->getComponents() as $component) {
            if ($component instanceof Element) {
                $html .= $this->renderElementAsRow($component);
            } elseif ($component instanceof Group) {
                foreach ($component->getElements() as $element) {
                    $html .= $this->renderElementAsRow($element);
                }
            }
        }

        $table = new Tag('table');
        $table->setAttribute('class', $this->class);
        $table->setHtmlContent($html);

        return $table->render();
    }
1264228
public static function renderFormBegin(Form $form, array $attrs, $withTags = TRUE)
	{
		$renderer = $form->getRenderer();
		if ($renderer instanceof IManualRenderer) {
			$renderer->beforeRender($form);
		}
		return parent::renderFormBegin($form, $attrs, $withTags);
	}
1050967
public function render()
    {
        if (array_key_exists($this->formType, $this->formsType)) {
            $this->form = new $this->formsType[$this->formType]
            (
                $this->idName,
                $this->elements,
                $this->method,
                $this->action
            );
        }
        return $this->form->render();
    }
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);
    }
48862
public function renderForm(Model $model, array $config)
    {
        $form = null;
        foreach ($config as $attribute => $options) {
            $form .= $this->renderField($model, $attribute, $options);
        }

        return $form;
    }
24204
public function renderField()
    {
        list($name, $id) = $this->resolveNameID();

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

        $this->pluginOptions['id'] = $this->htmlOptions['id'] . '_switch';
        echo CHtml::openTag('div', $this->pluginOptions);
        if ($this->hasModel()) {
            echo $this->inputType == 'radio'
                ? CHtml::activeRadioButton($this->model, $this->attribute, $this->htmlOptions)
                : CHtml::activeCheckBox($this->model, $this->attribute, $this->htmlOptions);
        } else {
            echo $this->inputType == 'radio'
                ? CHtml::radioButton($this->name, $this->value, $this->htmlOptions)
                : CHtml::checkBox($this->name, $this->value, $this->htmlOptions);
        }
        echo CHtml::closeTag('div');
    }
1355833
public function renderFormFromCollection(ArgumentCollection $collection, $formName = "thelia.empty", $driverCode = null, $addHiddenFields = false)
    {
        $i = 0;
        $content = "";

        // Ensure that the template definition is on the BO
        $this->parser->setTemplateDefinition(TemplateHelper::getInstance()->getActiveAdminTemplate());

        /** @var \IndexEngine\Driver\Configuration\ArgumentInterface $argument */
        foreach ($collection->getArguments() as $argument) {
            if ($argument instanceof ParserAwareArgumentInterface) {
                $argument->setParser($this->parser);
            }

            $formattedTitle = $this->formatTitle($argument->getName());

            $content .= $this->parser->render("form-field/render-form-field.html", [
                "driver_code" => $driverCode,
                "form_name" => $formName,
                "form_field" => $argument->getName(),
                "argument" => $argument,
                "is_vector" => $argument instanceof VectorArgumentInterface,
                "is_view_builder" => $argument instanceof ViewBuilderInterface,
                "is_field_count_even" => $i % 2 === 0,
                "field_count" => $i++,
                "formatted_title" => $formattedTitle,
                "add_hidden_fields" => $addHiddenFields,
            ]);

            $addHiddenFields = false;
        }

        return $content;
    }
622952
public function display(core_backup_renderer $renderer) {

        $form = $this->initialise_stage_form();
        // A nasty hack follows to work around the sad fact that moodle quickforms
        // do not allow to actually return the HTML content, just to echo it.
        flush();
        ob_start();
        $form->display();
        $output = ob_get_contents();
        ob_end_clean();

        return $output;
    }
656708
protected function processRender(FormInterface $form, Request $request): void
    {
        /** @var Presenter $presenter */
        $presenter = $this->getPresenter();
        if (!$presenter->isAjax()) {
            throw new BadRequestException('The render signal is only allowed in ajax mode.');
        }

        $fields = $request->getPost($this->lookupPath(Presenter::class, true).self::NAME_SEPARATOR.'fields');
        if (!$fields) {
            throw new BadRequestException('No fields specified for rendering.');
        }

        $form->handleRequest($request);
        if (!$form->isSubmitted()) {
            throw new BadRequestException('The form was not submitted.');
        }

        $view = $this->getView();
        $widgets = [];
        foreach ($fields as $field) {
            // Validate the field identifier for security reasons. A dot in the identifier would be particularly dangerous.
            if (!Strings::match($field, '~^(?:\[\w++\])++$~')) {
                throw new BadRequestException(
                    sprintf('Field identifier "%s" contains unallowed characters.', $field)
                );
            }

            // Skip duplicates. The renderer would return an empty string on second try.
            if (isset($widgets[$field])) {
                continue;
            }

            // Wrap an exception from PropertyAccessor in a BadRequestException.
            try {
                $fieldView = $this->propertyAccessor->getValue($view, $field);
            } catch (ExceptionInterface $e) {
                throw new BadRequestException(
                    sprintf('FormView not found for field identifier "%s".', $field),
                    0,
                    $e
                );
            }

            // Render the field widget.
            $widgets[$field] = $this->renderer->searchAndRenderBlock($fieldView, 'widget');
        }

        $presenter->sendJson((object) ['widgets' => $widgets]);
    }