Accepts a renderer

@param HTML_QuickForm_Renderer $renderer An HTML_QuickForm_Renderer object
@param bool $required Whether a group is required
@param string $error An error message associated with a group
340426
public function accept(&$renderer, $required = false, $error = null) {
        if ($this->is_tagging_enabled()) {
            $renderer->renderElement($this, $required, $error);
        } else {
            $renderer->renderHidden($this);
        }
    }
629005
public function render(Renderer $renderer) {
    if (!$this->isDirectory() && is_null($this->getContent())) {
      $content = '';
      if ($header_template = $this->getHeaderTemplate()) {
        $content .= $renderer->render($header_template, $this->getVars()) . "\n";
      }
      $content .= $renderer->render($this->getTemplate(), $this->getVars());
      $this->content($content);
    }
  }
69414
public function renderGroupWith($groupName, callable $renderer)
    {
        $this->parent->renderGroupWith($this->groupName($groupName), $renderer);

        return $this;
    }
177007
@Override
	public void doRender(final WComponent component, final WebXmlRenderContext renderContext) {
		WValidationErrors errors = (WValidationErrors) component;
		XmlStringBuilder xml = renderContext.getWriter();

		if (errors.hasErrors()) {
			xml.appendTagOpen("ui:validationerrors");
			xml.appendAttribute("id", component.getId());
		xml.appendOptionalAttribute("class", component.getHtmlClass());
			xml.appendOptionalAttribute("track", component.isTracking(), "true");
			xml.appendOptionalAttribute("title", errors.getTitleText());
			xml.appendClose();

			for (GroupedDiagnositcs nextGroup : errors.getGroupedErrors()) {
				// Render each diagnostic message in this group.
				for (Diagnostic nextMessage : nextGroup.getDiagnostics()) {
					xml.appendTagOpen("ui:error");
					WComponent forComponent = nextMessage.getComponent();

					if (forComponent != null) {
						UIContextHolder.pushContext(nextMessage.getContext());

						try {
							xml.appendAttribute("for", forComponent.getId());
						} finally {
							UIContextHolder.popContext();
						}
					}

					xml.appendClose();

					// DiagnosticImpl has been extended to support rendering
					// of a WComponent as the message.
					if (nextMessage instanceof DiagnosticImpl) {
						WComponent messageComponent = ((DiagnosticImpl) nextMessage)
								.createDiagnosticErrorComponent();

						// We add the component to a throw-away container so that it renders with the correct ID.
						WContainer container = new WContainer() {
							@Override
							public String getId() {
								return component.getId();
							}
						};

						container.add(messageComponent);
						messageComponent.paint(renderContext);
						container.remove(messageComponent);
						container.reset();
					} else {
						xml.append(nextMessage.getDescription());
					}

					xml.appendEndTag("ui:error");
				}
			}

			xml.appendEndTag("ui:validationerrors");
		}
	}
4626
public function register(Renderer $renderer) {
        $this->registerTokenRenderer(LinkInlineRule::NAME, 'renderInline', $renderer);
        $this->registerTokenRenderer(LinkReferenceRule::NAME, 'renderReference', $renderer);
        $this->registerTokenRenderer(LinkAutoRule::NAME, 'renderAuto', $renderer);
    }
102179
public function render()
    {
        // Set the request arguments as GET parameters
        $_GET = $this->getRequestArguments();

        try {
            $rendererClassName = $this->element->getRendererClassName();

            /** @var FluidFormRenderer $renderer */
            $renderer = $this->objectManager->get($rendererClassName);
            if (!($renderer instanceof RendererInterface)) {
                throw new RenderingException(
                    sprintf('The renderer "%s" des not implement RendererInterface', $rendererClassName),
                    1326096024
                );
            }
            $renderer->setControllerContext($this->controllerContext);

            $this->controllerContext->getRequest()->setOriginalRequestMappingResults($this->validationErrors);
            $response = $this->objectManager->get(Response::class, $this->controllerContext->getResponse());
            /** @var FormRuntime $form */
            $form = $this->form->bind($this->controllerContext->getRequest(), $response);
            $renderer->setFormRuntime($form);

            $result = $this->beautify($renderer->render());

            // In case of an error
        } catch (\Exception $e) {
            $result = '<pre class="error"><strong>'.$e->getMessage().'</strong>'.PHP_EOL
                      .$e->getTraceAsString().'</pre>';
        }

        return $result;
    }
905757
function accept(&$renderer)
    {
        $renderer->startForm($this);
        foreach (array_keys($this->_elements) as $key) {
            $element =& $this->_elements[$key];
            $elementName = $element->getName();
            $required    = ($this->isElementRequired($elementName) && !$element->isFrozen());
            $error       = $this->getElementError($elementName);
            $element->accept($renderer, $required, $error);
        }
        $renderer->finishForm($this);
    }
1305167
public function render($required = false, $type = 'text')
    {
        $name = $this->getName();
        $this->registerFieldNameForFormTokenGeneration($name);

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

        $value = $this->getValueAttribute();

        if ($value !== null) {
            $this->tag->addAttribute('value', $value);
        }

        if ($required === true) {
            $this->tag->addAttribute('required', 'required');
        }

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

        return $this->tag->render();
    }
681693
public function checkRequired($validator, Element &$element)
    {
        if (in_array($validator, ['notEmpty'])) {
            $element->getInput()->required = true;
            $element->getInput()->allowEmpty = false;
        }
    }
201063
function accept(&$renderer, $required=false, $error=null)
    {
        $this->_text .= $this->getHelpButton();
        $renderer->renderHeader($this);
    }
989871
public function register(Renderer $renderer) {
        $this->registerTokenRenderer(CodeRule::NAME . CodeRule::OPEN, 'renderOpen', $renderer);
        $this->registerTokenRenderer(CodeRule::NAME . CodeRule::CLOSE, 'renderClose', $renderer);
        $this->registerTokenRenderer(CodeRule::NAME, 'renderContent', $renderer);

        $this->registerTokenRenderer(CodeAltRule::NAME . CodeAltRule::OPEN, 'renderOpen', $renderer);
        $this->registerTokenRenderer(CodeAltRule::NAME . CodeAltRule::CLOSE, 'renderClose', $renderer);
        $this->registerTokenRenderer(CodeAltRule::NAME, 'renderContent', $renderer);
    }
1371538
public function required($required = null) {

		if(false === is_bool($required) && null !== $required) {
			return trigger_error(sprintf('Argument 1 passed to %s() must be of the type boolean, "%s" given', __METHOD__, gettype($required)), E_USER_ERROR);
		}

		if(null === $required) {
			$required = true;
		}

		foreach($this -> getFieldnames() as $field) {
			$this -> required[$field] = $required;
		}

		return $this;
	}
33001
public function render(AbstractBlock $block, CliRenderer $renderer)
    {
        if (!($block instanceof ListItem)) {
            throw new \InvalidArgumentException(sprintf('Incompatible block type: "%s"', get_class($block)));
        }

        return $renderer->style(' * ', 'yellow') . $renderer->renderBlocks($block->children());
    }
446596
public function injectRenderer($helper)
    {
        $renderer = $this->getRenderer();
        if (null === $renderer) {
            return;
        }

        $helper->setView($renderer);
    }
1319194
public function render($error)
	{
		try
		{
			if (!$this->document)
			{
				// We're probably in an CLI environment
				exit($error->getMessage());
			}

			$this->document->setType('error');

			// Push the error object into the document
			$this->document->setError($error);

			if (ob_get_contents())
			{
				ob_end_clean();
			}

			$this->document->setTitle(\Lang::txt('Error') . ': ' . $error->getCode());

			$template = $this->template->load();

			$data = $this->document->render(
				false,
				array(
					'template'  => $template->template,
					'directory' => dirname($template->path),
					'debug'     => $this->debug
				)
			);

			// Failsafe to get the error displayed.
			if (empty($data))
			{
				exit($error->getMessage() . ' in ' . $error->getFile() . ':' . $error->getLine());
			}
			else
			{
				$status = $error->getCode() ? $error->getCode() : 500;
				$status = ($status < 100 || $status >= 600) ? 500 : $status;

				$response = new Response($data, $status);
				$response->send();

				exit();
			}
		}
		catch (Exception $e)
		{
			$plain = new Plain($this->debug);
			$plain->render($e);
		}
	}
337089
public function render(HTML_QuickForm2_Renderer $renderer)
    {
        $renderer->startForm($this);
        $renderer->getJavascriptBuilder()->startForm($this);
        foreach ($this as $element) {
            $element->render($renderer);
        }
        $renderer->finishForm($this);
        return $renderer;
    }
986972
protected function renderHtmlError(Throwable $error)
    {
        $html = sprintf('<div><strong>Type:</strong> %s</div>', get_class($error));

        if (($code = $error->getCode())) {
            $html .= sprintf('<div><strong>Code:</strong> %s</div>', $code);
        }

        if (($message = $error->getMessage())) {
            $html .= sprintf('<div><strong>Message:</strong> %s</div>', htmlentities($message));
        }

        if (($file = $error->getFile())) {
            $html .= sprintf('<div><strong>File:</strong> %s</div>', $file);
        }

        if (($line = $error->getLine())) {
            $html .= sprintf('<div><strong>Line:</strong> %s</div>', $line);
        }

        if (($trace = $error->getTraceAsString())) {
            $html .= '<h2>Trace</h2>';
            $html .= sprintf('<pre>%s</pre>', htmlentities($trace));
        }

        return $html;
    }