Method create object for render each element. Execute initElement method
@return array
549534
public function render()
    {
        $elements = [];

        foreach($this->builders as $builder) {
            $object = new $builder;
            $elements[] = [
                'element' => $object->initElement(),
                'options' => $object->getAdditionalOptions()
                ];
        }
        return $elements;
    }
485014
public function render()
	{
		/**
		 * Check whether datagrid has set some columns, initiated data source, etc
		 */
		if (!($this->dataModel instanceof DataModel)) {
			throw new DataGridException('You have to set a data source first.');
		}

		if (empty($this->columns)) {
			throw new DataGridException('You have to add at least one column.');
		}

		$template = $this->getTemplate();
		$template->setTranslator($this->getTranslator());

		/**
		 * Invoke possible events
		 */
		$this->onRender($this);

		/**
		 * Prepare data for rendering (datagrid may render just one item)
		 */
		$rows = [];

		if (!empty($this->redraw_item)) {
			$items = $this->dataModel->filterRow($this->redraw_item);
		} else {
			$items = Nette\Utils\Callback::invokeArgs(
				[$this->dataModel, 'filterData'],
				[
					$this->getPaginator(),
					$this->createSorting($this->sort, $this->sort_callback),
					$this->assembleFilters(),
				]
			);
		}

		$callback = $this->rowCallback ?: null;
		$hasGroupActionOnRows = false;

		foreach ($items as $item) {
			$rows[] = $row = new Row($this, $item, $this->getPrimaryKey());

			if (!$hasGroupActionOnRows && $row->hasGroupAction()) {
				$hasGroupActionOnRows = true;
			}

			if ($callback) {
				$callback($item, $row->getControl());
			}

			/**
			 * Walkaround for item snippet - snippet is the <tr> element and its class has to be also updated
			 */
			if (!empty($this->redraw_item)) {
				$this->getPresenter()->payload->_datagrid_redraw_item_class = $row->getControlClass();
				$this->getPresenter()->payload->_datagrid_redraw_item_id = $row->getId();
			}
		}

		if ($hasGroupActionOnRows) {
			$hasGroupActionOnRows = $this->hasGroupActions();
		}

		if ($this->isTreeView()) {
			$template->add('tree_view_has_children_column', $this->tree_view_has_children_column);
		}

		$template->rows = $rows;

		$template->columns = $this->getColumns();
		$template->actions = $this->actions;
		$template->exports = $this->exports;
		$template->filters = $this->filters;
		$template->toolbar_buttons = $this->toolbar_buttons;
		$template->aggregation_functions = $this->getAggregationFunctions();
		$template->multiple_aggregation_function = $this->getMultipleAggregationFunction();

		$template->filter_active = $this->isFilterActive();
		$template->original_template = $this->getOriginalTemplateFile();
		$template->icon_prefix = static::$icon_prefix;
		$template->icon_prefix = static::$icon_prefix;
		$template->items_detail = $this->items_detail;
		$template->columns_visibility = $this->getColumnsVisibility();
		$template->columnsSummary = $this->columnsSummary;

		$template->inlineEdit = $this->inlineEdit;
		$template->inlineAdd = $this->inlineAdd;

		$template->hasGroupActions = $this->hasGroupActions();
		$template->hasGroupActionOnRows = $hasGroupActionOnRows;

		/**
		 * Walkaround for Latte (does not know $form in snippet in {form} etc)
		 */
		$template->filter = $this['filter'];

		/**
		 * Set template file and render it
		 */
		$template->setFile($this->getTemplateFile());
		$template->render();
	}
795828
protected function initElements()
    {
        $userElement = \tao_helpers_form_FormFactory::getElement('user', 'Hidden');
        $userElement->setValue(\common_session_SessionManager::getSession()->getUserUri());
        $this->form->addElement($userElement);
        
        $roleOptions = array();
        foreach(\common_session_SessionManager::getSession()->getUserRoles() as $role){
            $roleResource = new \core_kernel_classes_Resource($role);
			$roleOptions[$role] = $roleResource->getLabel();
		}
        
        $roleElement = \tao_helpers_form_FormFactory::getElement('rolefilter', 'Checkbox');
        $roleElement->setDescription(__('Keep roles'));
        $roleElement->setOptions($roleOptions);
        $roleElement->setValues(array_keys($roleOptions));

        $this->form->addElement($roleElement);
    }
751653
public function renderElements()
	{
		$output='';
		foreach($this->getElements() as $element)
			$output.=$this->renderElement($element);
		return $output;
	}
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();
    }
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}>";
    }
729203
public function onGetJSONData()
    {
        $iElementID = Input::get('element_id');
        $obElementItem = $this->makeItem($iElementID);

        return $obElementItem->toJSON();
    }
719036
public function renderItems()
    {
        $rows = [];
        $this->dataProvider->setKeys([]);
        $models = array_values($this->dataProvider->getModels());
        $models = $this->normalizeData($models, $this->parentRootValue);
        $this->dataProvider->setModels($models);
        $this->dataProvider->setKeys(null);
        $this->dataProvider->prepare();
        $keys = $this->dataProvider->getKeys();
        foreach ($models as $index => $model) {
            $key = $keys[$index];
            if ($this->beforeRow !== null) {
                $row = call_user_func($this->beforeRow, $model, $key, $index, $this);
                if (!empty($row)) {
                    $rows[] = $row;
                }
            }

            $rows[] = $this->renderTableRow($model, $key, $index);

            if ($this->afterRow !== null) {
                $row = call_user_func($this->afterRow, $model, $key, $index, $this);
                if (!empty($row)) {
                    $rows[] = $row;
                }
            }
        }

        if (empty($rows)) {
            $colspan = count($this->columns);
            return "<tr><td colspan=\"$colspan\">" . $this->renderEmpty() . "</td></tr>";
        } else {
            return implode("\n", $rows);
        }
    }
1304391
public function _createElements() {
        if (!$this->has_customize_switch()) {
            $element = $this->createFormElement('hidden', 'customize', 1);
        } else {
            $element = $this->createFormElement('advcheckbox', 'customize', '', $this->_options['customlabel']);
        }
        $this->_elements[] = $element;

        if ($this->_options['type'] === 'text') {
            $element = $this->createFormElement($this->_options['type'], 'value',
                get_string('newvaluefor', 'form', $this->getLabel()), $this->getAttributes());
            $element->setHiddenLabel(true);
        } else if ($this->_options['type'] === 'date_selector') {
            $element = $this->createFormElement($this->_options['type'], 'value', '', $this->_options,
                $this->getAttributes());
        } else if ($this->_options['type'] === 'date_time_selector') {
            $element = $this->createFormElement($this->_options['type'], 'value', '', $this->_options,
                $this->getAttributes());
        }
        $this->_elements[] = $element;
    }
997992
public function renderButtons()
    {
        $buttons = array();
        foreach ($this->getButtons() as $button) {
            $buttons[] = $this->renderElement($button);
        }
        return $this->getActiveFormWidget()->createFormActions($buttons);
    }
1196249
protected function initElements()
    {
        $clazz = $this->getClassInstance();

        $labelProp = new \core_kernel_classes_Property(OntologyRdfs::RDFS_LABEL);
        //map properties widgets to form elements
        $element = \tao_helpers_form_GenerisFormFactory::elementMap($labelProp);
        if (!is_null($element)) {

            $value = $clazz->getLabel();
            if (!is_null($value)) {
                $element->setValue($value);
            }
            //set label validator
            $element->addValidators([
                \tao_helpers_form_FormFactory::getValidator('NotEmpty'),
            ]);
            $namespace = substr($clazz->getUri(), 0, strpos($clazz->getUri(), '#'));
            if ($namespace != LOCAL_NAMESPACE) {
                $readonly = \tao_helpers_form_FormFactory::getElement($element->getName(), 'Readonly');
                $readonly->setDescription($element->getDescription());
                $readonly->setValue($element->getRawValue());
                $element = $readonly;
            }
            $element->addClass('global');
            $this->form->addElement($element);
        }

        //add an hidden elt for the class uri
        $classUriElt = \tao_helpers_form_FormFactory::getElement('classUri', 'Hidden');
        $classUriElt->setValue(\tao_helpers_Uri::encode($clazz->getUri()));
        $classUriElt->addClass('global');
        $this->form->addElement($classUriElt);

        $this->addSignature();
    }
376831
protected function renderItems()
    {
        $buttons = [];
        foreach ($this->items as $item) {
            if (is_array($item)) {
                $item['view'] = $this->getView();
                if (!isset($item['tagName'])) {
                    $item['tagName'] = $this->itemTagName;
                }
                if (!isset($item['encodeLabel'])) {
                    $item['encodeLabel'] = $this->encodeLabels;
                }
                if (!isset($item['type'])) {
                    Html::addCssClass($item['options'], 'collection-item');
                } else {
                    Html::addCssClass($item['options'], 'collection-' . $item['type']);
                }
                if (!isset($item['options'])) {
                    $item['options'] = [];
                }

                $items[] = Html::tag($item['tagName'], $item['label'], $item['options']);
            } else {
                $items[] = $item;
            }
        }

        return implode("\n", $items);
    }
78660
public function render()
    {
        $this->getEventManager()->trigger(
            'formBeforeRender',
            $this,
            array(

            )
        );
        $output = parent::render();
        $this->getEventManager()->trigger(
            'formAfterRender',
            $this,
            array(
                'output' => &$output
            )
        );
        return $output;
    }
699687
public function onGetData()
    {
        $iElementID = Input::get('element_id');
        $obElementItem = $this->makeItem($iElementID);

        return $obElementItem->toArray();
    }
1060868
protected function render()
    {
        if (!isset($this->items[0])) {
            return '';
        }
        foreach ($this->items as $itemId => $item) {
            $item->setCollapsable(
                self::$id, 
                self::$id . $itemId, 
                in_array($itemId, $this->openedItems));
        }
        $this->setAttribute('id', self::$id);
        $this->addCssClass($this->itemType . '-group');
        return $this
            ->html('<div' . $this->getEltDecorationStr() . '>')
            ->html(implode("\n", $this->items))
            ->html('</div>')
            ->getHtml();
    }
1235205
private function _render() {return $this->e()->getNoDisplay() ? '' : (
		'hidden' === $this->e()->getType()
		? $this->elementHtml()
		: df_tag('div', ['class' => $this->outerCssClasses()], $this->inner())
	);}
102452
final public function init()
    {
        $sm = $this->getServiceLocator();
        $config = $sm->get($this->moduleService)->config();
        if (array_key_exists('*', $config)) {
            // Inject form instance if * is closure
            if (is_object($config['*']) && $config['*'] instanceof \Closure) {
                $form = $config['*']($this);
            }
        }
        $this->initialize();
        // Initialize form elements
        foreach ($this->getFormElements() as $element) {
            $elementOptions = array();
            if (array_key_exists($element['name'], $this->formElementOptions)) {
                $elementOptions = $this->formElementOptions[$element['name']];
            }
            // Add id attribute for each element
            if (!array_key_exists('attributes', $element)) {
                $element['attributes'] = array();
                $element['attributes'] ['id'] = $element['name'];
            } else {
                $element['attributes'] ['id'] = $element['name'];
            }
            $this->add($element, $elementOptions);
        }
        return $this;
    }