Builds buttons using [[buttonsTemplate]] and [[buttonsParts]].

@return string
@see buttonsTemplates
@see buttonsParts
176577
protected function buildButtons()
    {
        if (!isset($this->buttonsParts['{intervalSelect}'])) {
            $this->buttonsParts['{intervalSelect}'] = $this->buildIntervalSelect();
        }

        if (!isset($this->buttonsParts['{aggregationSelect}'])) {
            $this->buttonsParts['{aggregationSelect}'] = $this->buildAggregationSelect();
        }

        return strtr($this->buttonsTemplate, $this->buttonsParts);
    }
113288
protected function renderButtons()
    {
        if (!empty($this->buttons)) {
            $html = '';

            foreach ($this->buttons as $button) {
                    $html .= "$button\n";
            }

            return Html::tag('div', $html, ['class' => 'actions btn-set']);
        }

        return '';
    }
430273
public function getButtonDimensions()
    {
        // Initialise:
        
        $data = [];
        
        // Obtain Dimensions:
        
        $sizes = $this->dbObject('ButtonSize');
        
        // Iterate Size Viewports:
        
        foreach ($sizes->getViewports() as $viewport) {
            
            if ($value = $sizes->getField($viewport)) {
                $data[$viewport]['Size'] = $value;
                $data[$viewport]['Breakpoint'] = $sizes->getBreakpoint($viewport);
            }
            
        }
        
        // Obtain Icon Dimensions:
        
        $iconSizes = $this->dbObject('IconSize');
        
        // Iterate Icon Size Viewports:
        
        foreach ($iconSizes->getViewports() as $viewport) {
            
            if ($value = $iconSizes->getField($viewport)) {
                $data[$viewport]['IconSize'] = $value;
                $data[$viewport]['Breakpoint'] = $iconSizes->getBreakpoint($viewport);
            }
            
        }
        
        // Create Items List:
        
        $items = ArrayList::create();
        
        // Create Data Items:
        
        foreach ($data as $item) {
            $items->push(ArrayData::create($item));
        }
        
        // Answer Items List:
        
        return $items;
    }
468999
public function formatLayoutTemplateFiles()
     {
         $name = $this->getName();
         $presenter = substr($name, strrpos(':'.$name, ':'));
         $layout = $this->layout ? $this->layout : 'layout';
         $dir = dirname($this->getReflection()->getFileName());
         $dir = is_dir("$dir/templates") ? $dir : dirname($dir);

         $list = array(
             APP_DIR."/../libs/webcms2/webcms2/AdminModule/templates/@$layout.latte",
         );

         do {
             $list[] = "$dir/templates/@$layout.latte";
             $list[] = "$dir/templates/@$layout.phtml";
             $dir = dirname($dir);
         } while ($dir && ($name = substr($name, 0, strrpos($name, ':'))));

         return $list;
     }
739409
public function build()
    {
        $lines = [];

        $lines[] = sprintf('BEGIN:%s', $this->getType());

        /** @var $property Property */
        foreach ($this->buildPropertyBag() as $property) {
            foreach ($property->toLines() as $l) {
                $lines[] = $l;
            }
        }

        $this->buildComponents($lines);

        $lines[] = sprintf('END:%s', $this->getType());

        $ret = [];

        foreach ($lines as $line) {
            foreach (ComponentUtil::fold($line) as $l) {
                $ret[] = $l;
            }
        }

        return $ret;
    }
498797
protected function renderButtonGroups()
    {
        $buttonGroups = [];
        foreach ($this->buttonGroups as $group) {
            if (is_array($group)) {
                $group['view'] = $this->getView();

                if (!isset($group['buttons'])) {
                    continue;
                }

                $buttonGroups[] = ButtonGroup::widget($group);
            } else {
                $buttonGroups[] = $group;
            }
        }

        return implode("\n", $buttonGroups);
    }
591287
protected function _getTemplate()
    {
        if (is_null($this->_template)) {
            foreach ($this->_map as $method => $className) {
                if ($this->_sql instanceof $className) {
                    $this->_template = $this->$method();
                    break;
                }
            }
        }
        return $this->_template;
    }
632233
public function getTemplates()
	{
		$templates = [
			'br' => '<br/>',
			'e'  => '',
			'i'  => '',
			'p'  => '<p><xsl:apply-templates/></p>',
			's'  => ''
		];

		foreach ($this->configurator->tags as $tagName => $tag)
		{
			if (isset($tag->template))
			{
				$templates[$tagName] = (string) $tag->template;
			}
		}

		ksort($templates);

		return $templates;
	}
876438
public function showTemplates()
		{
			$form_data = array(
				'headers' => 1
			);
			$data = $this->call('show_templates', $form_data, 'csv');
			$csv = new \parseCSV($data);

			$templates = array();

			foreach ($csv->data as $template_item) {
				$template = new Template;
				$template
					->setTemplateId((int)$template_item['Template Number'])
					->setName((string)$template_item['Template Name'])
					->setFolderId((int)$template_item['Folder ID']);
				$templates[] = $template;
			}

			return $templates;
		}
197141
protected function _getFormSubmitExtraLeftButtons()
    {
        $action = $this->_action();
        $buttons = $action->getConfig('scaffold.form_submit_extra_left_buttons');

        if ($buttons === false) {
            return [];
        }

        if ($buttons === null || $buttons === true) {
            $buttons = $this->_getDefaultExtraLeftButtons();
        }

        return $buttons;
    }
714628
public function getListTemplate()
    {
        if (null === $this->listTemplate) {
            $template = rtrim($this->getTemplatePrefix(), '/') . '/' . $this->getListSuffix();
            $this->setListTemplate($template);
        }

        return $this->listTemplate;
    }
1000120
private function build() {

    	if(null === $this -> text) {

    		$html = '<input type="'. $this -> type .'"';
    		
    		foreach($this -> attributes as $attribute => $value) {
    		    $html .= ' ' . $attribute . '="'. Escape :: attr($value) .'"';
    		}

    		$html .= '>';

    		return $html;
    	}

        $this -> fill();
        
        $html = '<button';
        
        foreach($this -> attributes as $attribute => $value) {
            $html .= ' ' . $attribute . '="'. Escape :: attr($value) .'"';
        }

        $html .= '>' . Escape :: html($this -> text) . '</button>';

        return $html;
        
    }
636977
public function buildHtml()
	{
		$list	= array();
		$divs	= array();
		foreach( $this->steps as $nr => $step )
		{
			$id		= $this->id."_link".$nr;
			$list[]	= UI_HTML_Elements::ListItem( $step['label'], 0, array( 'id' => $id ) );
			$id		= $this->id."_".$nr;
			$divs[] = UI_HTML_Tag::create( 'div', $step['content'], array( 'id' => $id ) );
		}
		$list	= UI_HTML_Elements::unorderedList( $list );
		$divs	= implode( "\n", $divs );
		$div	= UI_HTML_Tag::create( 'div', "\n".$list.$divs."\n", array( 'id' => $this->id ) );
		return $div;
	}
422004
private function buildElements(){

        $eles = $this->getElements();
        $groups = $this->elementsGroup($eles);
        $formNs = $this->formNs;

        $elementsHtml = '';
        foreach ($groups as $k=>$v){
            $elements = isset($v['elements']) ? $v['elements'] : null;
            if ($elements){

                if ($k != 'base'){
                    $elementsHtml .= '<fieldset class="'.$formNs.'form-field'.$k.'" id="'.$formNs.'form-field-'.$k.'" >';
                    if (isset($v['title']) && $v['title']){
                        $elementsHtml .= '<legend>'.$v['title'].'</legend>';
                    }

                }
                foreach ($elements as $ele){
                    $type = $ele['type'];
                    if ($type == 'text' || $type == 'hidden' || $type == 'password' || $type == 'email' || $type == 'file' || $type =='button' || $type == 'number'){
                        $elementsHtml .= $this->buildInput($ele);
                    }
                    if ($type == 'textarea') {
                        $elementsHtml .= $this->buildTextarea($ele);
                    }
                    if ($type == 'select'){
                        $elementsHtml .= $this->buildSelect($ele);
                    }
                    if ($type == 'radio'){
                        $elementsHtml .= $this->buildRadio($ele);
                    }
                    if ($type == 'checkbox'){
                        $elementsHtml .= $this->buildCheckbox($ele);
                    }
                    if ($type == 'submit' || $type == 'reset'){
                        $elementsHtml .= $this->buildSubmit($ele);
                    }
                }
                if ($k != 'base'){
                    $elementsHtml .= '</fieldset>';
                }


            }
        }




        return $elementsHtml;
    }
1288388
public function buildTemplate()
    {
        if (!empty($this->template)) {
            return $this->template;
        }

        $columns = [];
        foreach ($this->columnTemplateBuilders as $columnTemplateBuilder) {
            $columns[] = $columnTemplateBuilder->buildTemplate();
        }

        $this->template = [
            'type' => TemplateType::CAROUSEL,
            'columns' => $columns,
        ];

        if ($this->imageAspectRatio) {
            $this->template['imageAspectRatio'] = $this->imageAspectRatio;
        }

        if ($this->imageSize) {
            $this->template['imageSize'] = $this->imageSize;
        }

        return $this->template;
    }
61589
private function buildParts($template)
    {
        $template = str_replace([
            '$NAMESPACE$',
            '$MODEL$',
            '$CREATEREQUESTNAME$',
            '$UPDATEREQUESTNAME$',
            '$CLASS$',
            '$COLLECTION$',
            '$RESOURCE$',
            '$INDEXGET$',
            '$RELATIONSHIPS$',
            '$RELATIONSHIP_COMPACT$',
            '$RELATIONSHIP_COMPACT_EDIT$',
            '$RELATIONSHIP_NAMESPACES$',
            '$FILETRAIT$',
            '$FILESAVING$',
            '$ENUM$',
        ], [
            $this->namespace,
            $this->modelName,
            $this->createRequestName,
            $this->updateRequestName,
            $this->className,
            strtolower($this->modelName),
            strtolower($this->modelName),
            $this->indexBuilder(),
            $this->relationshipsBuilder(),
            $this->compactBuilder(),
            $this->compactEditBuilder(),
            $this->relationshipsNamespaces(),
            $this->files > 0 ? 'use App\Http\Controllers\Traits\FileUploadTrait;' : '',
            $this->files > 0 ? '$request = $this->saveFiles($request);' : '',
            $this->enum > 0 ? $this->enum() : '',
        ], $template);

        return $template;
    }
1081842
protected function getEditButtons()
    {
        $buttons         = [];
        $basicDefinition = $this->getDataDefinition()->getBasicDefinition();

        $buttonTemplate = new ContaoBackendViewTemplate('dc_general_button');

        $buttonTemplate->setData(
            [
                'label'      => $this->getButtonLabel('save'),
                'attributes' => [
                    'type'      => 'submit',
                    'name'      => 'save',
                    'id'        => 'save',
                    'class'     => 'tl_submit',
                    'accesskey' => 's'
                ]
            ]
        );
        $buttons['save'] = $buttonTemplate->parse();

        $buttonTemplate->setData(
            [
                'label'      => $this->getButtonLabel('saveNclose'),
                'attributes' => [
                    'type'      => 'submit',
                    'name'      => 'saveNclose',
                    'id'        => 'saveNclose',
                    'class'     => 'tl_submit',
                    'accesskey' => 'c'
                ]
            ]
        );
        $buttons['saveNclose'] = $buttonTemplate->parse();

        if (!$this->isPopup() && $basicDefinition->isCreatable()) {
            $buttonTemplate->setData(
                [
                    'label'      => $this->getButtonLabel('saveNcreate'),
                    'attributes' => [
                        'type'      => 'submit',
                        'name'      => 'saveNcreate',
                        'id'        => 'saveNcreate',
                        'class'     => 'tl_submit',
                        'accesskey' => 'n'
                    ]
                ]
            );
            $buttons['saveNcreate'] = $buttonTemplate->parse();
        }

        if ($this->getEnvironment()->getInputProvider()->hasParameter('s2e')) {
            $buttonTemplate->setData(
                [
                    'label'      => $this->getButtonLabel('saveNedit'),
                    'attributes' => [
                        'type'      => 'submit',
                        'name'      => 'saveNedit',
                        'id'        => 'saveNedit',
                        'class'     => 'tl_submit',
                        'accesskey' => 'e'
                    ]
                ]
            );
            $buttons['saveNedit'] = $buttonTemplate->parse();
        } elseif (!$this->isPopup()
                  && ((BasicDefinitionInterface::MODE_PARENTEDLIST === $basicDefinition->getMode())
                      || '' !== $basicDefinition->getParentDataProvider()
                      || $basicDefinition->isSwitchToEditEnabled()
                  )
        ) {
            $buttonTemplate->setData(
                [
                    'label'      => $this->getButtonLabel('saveNback'),
                    'attributes' => [
                        'type'      => 'submit',
                        'name'      => 'saveNback',
                        'id'        => 'saveNback',
                        'class'     => 'tl_submit',
                        'accesskey' => 'g'
                    ]
                ]
            );
            $buttons['saveNback'] = $buttonTemplate->parse();
        }

        $event = new GetEditModeButtonsEvent($this->getEnvironment());
        $event->setButtons($buttons);

        $this->getEnvironment()->getEventDispatcher()->dispatch($event::NAME, $event);

        $submitButtons = ['toggleIcon' => Image::getHtml('navcol.svg')];
        $editButtons   = $event->getButtons();
        if (\array_key_exists('save', $editButtons)) {
            $submitButtons['save'] = $editButtons['save'];
            unset($editButtons['save']);
        }

        if (\count($editButtons)) {
            $submitButtons['buttonGroup'] = $editButtons;
        }

        $submitButtonTemplate = new ContaoBackendViewTemplate('dc_general_submit_button');
        $submitButtonTemplate->setData($submitButtons);

        return \preg_replace('/(\s\s+|\t|\n)/', '', $submitButtonTemplate->parse());
    }