render all the form elements

@access public
@author Cédric Alfonsi, <cedric.alfonsi@tudor.lu>
@return string
340408
public function renderElements()
    {
        $returnValue = '';


		foreach($this->elements as $element){

			 if($this->getElementGroup($element->getName()) !== ''){
			 	continue;	//render grouped elements after
			 }

			 if(!is_null($this->getDecorator()) && !($element instanceof tao_helpers_form_elements_Hidden)){
			 	$returnValue .= $this->getDecorator()->preRender();
			 }

             if(!$this->isValid() && $element->getError()) {
                $element->addClass('error');
             }

			 //render element
			 $returnValue .= $element->render();

			 //render element help
			 $help = trim($element->getHelp());
			 if(!empty($help)){
				 if(!is_null($this->getDecorator('help'))){
			 		$returnValue .= $this->getDecorator('help')->preRender();
			 	}

			 	$returnValue .= $help;

				if(!is_null($this->getDecorator('help'))){
			 		$returnValue .= $this->getDecorator('help')->postRender();
			 	}
			 }

			 //render error message
			 if(!$this->isValid() && $element->getError()){
			 	if(!is_null($this->getDecorator('error'))){
			 		$returnValue .= $this->getDecorator('error')->preRender();
			 	}

			 	$returnValue .= nl2br($element->getError());

				if(!is_null($this->getDecorator('error'))){
			 		$returnValue .= $this->getDecorator('error')->postRender();
			 	}
			 }

			 if(!is_null($this->getDecorator()) && !($element instanceof tao_helpers_form_elements_Hidden)){
			 	$returnValue .= $this->getDecorator()->postRender();
			 }
		}

		$subGroupDecorator = null;
		if(!is_null($this->getDecorator('group'))){
			$decoratorClass = get_class($this->getDecorator('group'));
			$subGroupDecorator = new $decoratorClass();
		}

		//render group
		foreach($this->groups as $groupName => $group){

			if(!is_null($this->getDecorator('group'))){
				$this->getDecorator('group')->setOption('id', $groupName);
				if(isset($group['options'])){
					if(isset($group['options']['class'])){
						$currentClasses = array_map('trim', explode(' ',$this->getDecorator('group')->getOption('cssClass')));
						if(!in_array($group['options']['class'], $currentClasses)){
							$currentClasses[] = $group['options']['class'];
							$this->getDecorator('group')->setOption('cssClass', implode(' ', array_unique($currentClasses)));
						}
					}
				}
				$returnValue .= $this->getDecorator('group')->preRender();
			}
			$returnValue .= $group['title'];
			if(!is_null($subGroupDecorator)){
				$returnValue .= $subGroupDecorator->preRender();
			}
			foreach($group['elements'] as $elementName){
				 if($this->getElementGroup($elementName) === $groupName && $element = $this->getElement( $elementName )){

				 	if(!is_null($this->getDecorator())){// && !($element instanceof tao_helpers_form_elements_Hidden) ){

					 	$returnValue .= $this->getDecorator()->preRender();
					 }

					 //render element
                     if ( ! $this->isValid() && $element->getError()) {
                         $element->addClass( 'error' );
                     }
					 $returnValue .= $element->render();

					 //render element help
					 $help = trim($element->getHelp());
					 if(!empty($help)){
						 if(!is_null($this->getDecorator('help'))){
					 		$returnValue .= $this->getDecorator('help')->preRender();
					 	}

					 	$returnValue .= $help;

						if(!is_null($this->getDecorator('help'))){
					 		$returnValue .= $this->getDecorator('help')->postRender();
					 	}
					 }

					 //render error message
					 if(!$this->isValid() && $element->getError()){
					 	if(!is_null($this->getDecorator('error'))){
					 		$returnValue .= $this->getDecorator('error')->preRender();
					 	}
					 	$returnValue .= nl2br($element->getError());
						if(!is_null($this->getDecorator('error'))){
					 		$returnValue .= $this->getDecorator('error')->postRender();
					 	}
					 }

					 if(!is_null($this->getDecorator())){// && !($element instanceof tao_helpers_form_elements_Hidden) ){
					 	$returnValue .= $this->getDecorator()->postRender();
					 }
				 }
			}
			if(!is_null($subGroupDecorator)){
				$returnValue .= $subGroupDecorator->postRender();
			}
			if(!is_null($this->getDecorator('group'))){
				$returnValue .= $this->getDecorator('group')->postRender();
				$this->getDecorator('group')->setOption('id', '');
			}
		}


        return $returnValue;
    }
534077
public function render() {

		if($this->loadTemplate())	{

			$this
				->primeTemplate()
				->insertFormFields()
				->insertErrorMessages()
				->insertFormStart()
				->insertFormEnd()
				->cleanupHtml()
			;

			return $this->html;

		}

	}
268273
public function render() {
		
		$model = $this->getParent()->getModel();
		$attribute = $this->name;
		$options = $this->generateGroupOptions();

		if (isset(self::$inputTypes[$this->type])) {
			$method = self::$inputTypes[$this->type];
			// FIXME ... why we are passing $this->attributes ... most all TbActiveForm method only require $options 
			return $this->getParent()->getActiveFormWidget()->$method($model, $attribute, $this->attributes, $options);
			/* no need for this as now data goes inside $options['widgetOptions']['data']
			switch ($method) {
				case 'listBoxGroup':
				case 'dropDownListGroup':
				case 'checkBoxListGroup':
				case 'radioButtonListGroup': 
					return $this->getParent()->getActiveFormWidget()->$method($model, $attribute, $this->attributes, $this->items, $options);

				default:
					return $this->getParent()->getActiveFormWidget()->$method($model, $attribute, $this->attributes, $options);
			}
			*/
		} else {
			$attributes = $this->attributes;
			$attributes['model'] = $this->getParent()->getModel();
			$attributes['attribute'] = $this->name;

			return $this->getParent()->getActiveFormWidget()->customFieldGroup(
				array(array($this->getParent()->getOwner(), 'widget'), array($this->type, $attributes, true)),
				$model,
				$attribute,
				$options
			);
		}
	}
1064832
public function render()
    {
        if (!$this->grid->allowExport()) {
            return '';
        }

        $this->setUpScripts();

        $export = trans('admin.export');
        $all = trans('admin.all');
        $currentPage = trans('admin.current_page');
        $selectedRows = trans('admin.selected_rows');

        $page = request('page', 1);

        return <<<EOT

<div class="btn-group pull-right" style="margin-right: 10px">
    <a class="btn btn-sm btn-twitter"><i class="fa fa-download"></i> {$export}</a>
    <button type="button" class="btn btn-sm btn-twitter dropdown-toggle" data-toggle="dropdown">
        <span class="caret"></span>
        <span class="sr-only">Toggle Dropdown</span>
    </button>
    <ul class="dropdown-menu" role="menu">
        <li><a href="{$this->grid->exportUrl('all')}" target="_blank">{$all}</a></li>
        <li><a href="{$this->grid->exportUrl('page', $page)}" target="_blank">{$currentPage}</a></li>
        <li><a href="{$this->grid->exportUrl('selected', '__rows__')}" target="_blank" class='export-selected'>{$selectedRows}</a></li>
    </ul>
</div>
&nbsp;&nbsp;

EOT;
    }
549534
public function render()
    {
        $elements = [];

        foreach($this->builders as $builder) {
            $object = new $builder;
            $elements[] = [
                'element' => $object->initElement(),
                'options' => $object->getAdditionalOptions()
                ];
        }
        return $elements;
    }
37761
public function render() {

		if ( ! isset( $this->struct['active'] ) ) {
			$this->struct['active'] = 'true';
		}

		$output = '<div id="' . esc_attr( $this->id() ) . '" class="uix-section" aria-hidden="' . esc_attr( $this->struct['active'] ) . '">' . $this->description();

		$output .= '<div class="uix-section-content">';

		$output .= $this->render_template();
		$output .= $this->render_children();

		$output .= '</div></div>';

		return $output;
	}
1334345
public function render()
    {
        if ($this->hasChildNodes()) {
            if ($this->childNodes->first() instanceof Button) {
                $this->attributes->removeAttributeClass('input-group-text');
            }
        }

        return parent::render();
    }
213501
public function render() {

		$output = '<div id="' . esc_attr( $this->id() ) . '" data-color="' . esc_attr( $this->base_color() ) . '" data-for="' . esc_attr( $this->id() ) . '-control" class="uix-control uix-control-' . esc_attr( $this->type ) . ' ' . esc_attr( $this->id() ) . '"></div>';
		$output .= $this->label();
		$output .= $this->input();

		$output .= $this->component_templates();

		$output .= $this->modal_template();

		return $output;
	}
1023614
public function renderForm()
    {
        $template = $this->path() . DS . 'in.ctp';

        if (!file_exists($template)) {
            user_error(__d('wasabi_cms', 'Template "{0}" for module {1} not found.', $template, $this->name()));
        }

        $viewClass = WasabiCms::getTheme()->getClassNameForInitialization();
        /** @var View $view */
        $view = new $viewClass();
        $output = $view->element('Wasabi/Cms.module', [
            'template' => $template,
            'form' => $this
        ]);

        return $output;
    }
757390
public function render() {
		
		$buffer = ''; 
		
		if ( !empty( $this->header ) ) {
			
			$buffer .= '<tr'.HTML::attr( $this->header[1] ).'>';
			foreach( $this->header[0] as $head ) {
				$head->name = 'th';
				$buffer .= $head->render();
			}
			$buffer .= '</tr>';
			foreach( $this->data as $row ) {
				$buffer .= '<tr'.HTML::attr( $row[1] ).'>';
				foreach( $this->header[0] as $key => $value ) {
					$buffer .= HTML::tag( 'td', $row[0][$key]->value, $row[0][$key]->attr );
				}
				$buffer .= '</tr>';
			}
		}
		else {
			foreach( $this->data as $row ) {
				$buffer .= '<tr'.HTML::attr( $row[1] ).'>';
				foreach( $row[0] as $value ) {
					$buffer .= $value->render();
				}
				$buffer .= '</tr>';
			}
		}
		
		$this->element->value = $buffer;
		
		return $this->element->render();
	}
1106762
public function render() {
        $rendered = '';
        foreach ($this->elements as $element) {
            if (!method_exists($this, 'openTag')) {
                $element->name = $this->multiple ?
                        $element->name . '[]' :
                        $this->getName() . '[' . $element->name . ']';

                $element->parent = $this->getName();
            }
            $rendered .= $element->render();
        }
        return $rendered;
    }
820002
public function renderBegin()
	{
		if($this->getParent() instanceof self)
			return '';
		else
		{
			$options=$this->activeForm;
			if(isset($options['class']))
			{
				$class=$options['class'];
				unset($options['class']);
			}
			else
				$class='CActiveForm';
			$options['action']=$this->action;
			$options['method']=$this->method;
			if(isset($options['htmlOptions']))
			{
				foreach($this->attributes as $name=>$value)
					$options['htmlOptions'][$name]=$value;
			}
			else
				$options['htmlOptions']=$this->attributes;
			ob_start();
			$this->_activeForm=$this->getOwner()->beginWidget($class, $options);
			return ob_get_clean() . "<div style=\"display:none\">".CHtml::hiddenField($this->getUniqueID(),1)."</div>\n";
		}
	}
643545
public function renderInput()
    {   
        Html::addCssClass($this->_displayOptions, 'element-' . $this->options['id']);
        Html::addCssClass($this->_displayOptions, 'form-control');
        $this->_displayOptions['rows'] = 1;
        $input = Html::activeTextarea($this->model, $this->attribute, $this->_displayOptions);
        echo $input;
    }
995894
public function render() {

		$output = '<' . $this->element . ' ' . $this->build_attributes() . '>';

		$output .= $this->label();

		$output .= $this->description();

		$output .= $this->render_template();

		if ( ! empty( $this->child ) ) {
			$output .= $this->render_children();
		}

		$output .= '</' . $this->element . '>';

		return $output;
	}
980133
public function Render()
    {
        $string = $this->string;
        $tag = $this->tag;

        $classes = $this->classes;
        if (Count($classes)) {
            if ($classPrefix = $this->classPrefix) {
                foreach ($classes as $key => $value) {
                    $prefixedClass = $classPrefix . '__' . $value;
                    $classes[$prefixedClass] = $prefixedClass;
                }
            }
            $this->addAttribute('class', implode(' ', $classes));
        }

        if ($this->isVoidElement() && $string) {
            if ($voidAttributeName = $this->VoidElements[$tag]) {
                $this->addAttribute($voidAttributeName, $string);
            } else {
                throw new InvalidArgumentException("Void element \"{$tag}\" cannot have string");
            }
        }

        $attributes = [];
        foreach ($this->attributes as $name => $value) {
            $attributes[] = sprintf(
                '%s="%s"',
                $name,
                Convert::raw2att($value)
            );
        }
        $attributes = Count($attributes) ? ' ' . implode(' ', $attributes) : '';

        if ($this->isVoidElement()) {
            return "<{$tag}{$attributes} />";
        }

        if (!isset($string) || !$string || $string == '') {
            return null;
        }

        return "<{$tag}{$attributes}>{$string}</{$tag}>";
    }
53691
public function render()
	{
		/** @var BootstrapRenderer $renderer */
		$renderer = $this->container->form->renderer;

		$element = $renderer->configElem(RendererConfig::gridRow, $this->elementPrototype);
		foreach ($this->cells as $cell) {
			$cellHtml = $cell->render();
			$element->addHtml($cellHtml);
		}

		return $element;
	}
55820
public function render()
    {
        $returnValue = $this->renderLabel();
        
        $returnValue .= "<select name='{$this->name}' id='{$this->name}' ";
        $returnValue .= $this->renderAttributes();
        $returnValue .= ">";
        if (! empty($this->emptyOption)) {
            $this->options = array_merge(array(
                ' ' => $this->emptyOption), $this->options);
        }
        foreach ($this->options as $optionId => $optionLabel) {
            $returnValue .= "<option value='{$optionId}' ";
            if ($this->value === $optionId) {
                $returnValue .= " selected='selected' ";
            }
            $returnValue .= ">" . _dh($optionLabel) . "</option>";
        }
        $returnValue .= "</select>";
        
        return (string) $returnValue;
    }