Build the array text for the Page Buttons

@return string
187767
protected function getPageButtonsArrayText()
    {
        if (empty($this->buttons)) {
            return Builder::getArray(array('' => 0), true);
        }
        $pageButtons = array();
        foreach ($this->buttons as $pageButton) {
            $pageButtons[$pageButton->getControl()
                                    ->getId()] = $pageButton->getPagingCount();
        }
        return Builder::getArray($pageButtons, true);
    }
342672
public function getButtonAttributes()
    {
        $attributes = [
            'type' => 'button',
            'class' => $this->ButtonClass,
            'title' => $this->ButtonLabel,
            'aria-label' => $this->ButtonLabel,
            'aria-expanded' => 'false',
            'aria-controls' => $this->CollapseHTMLID,
            'data-target' => $this->CollapseCSSID,
            'data-toggle' => 'collapse'
        ];
        
        $this->extend('updateButtonAttributes', $attributes);
        
        return $attributes;
    }
931558
public function renderButtonAdd()
	{
		$a = Html::el('a')->href('')->data('datagrid-toggle-inline-add', true);

		$this->tryAddIcon($a, $this->getIcon(), $this->getText());

		$a->addText($this->text);

		if ($this->title) {
			$a->title($this->grid->getTranslator()->translate($this->title));
		}
		if ($this->class) {
			$a->class($this->class);
		}

		return $a;
	}
1025477
protected function buildButtons()
    {
        // load button position defaults. We could load these into an array however we would still need to provide
        // a failsafe check for each setting so long hand here reduces processing overall
        $saveButtonPosition = Config::get('rapyd.data_edit.button_position.save') != '' ? Config::get('rapyd.data_edit.button_position.save') : 'BL';
        $showButtonPosition = Config::get('rapyd.data_edit.button_position.show') != '' ? Config::get('rapyd.data_edit.button_position.show') : 'TR';
        $modifyButtonPosition = Config::get('rapyd.data_edit.button_position.modify') != '' ? Config::get('rapyd.data_edit.button_position.modify') : 'TR';
        $undoButtonPosition = Config::get('rapyd.data_edit.button_position.undo') != '' ? Config::get('rapyd.data_edit.button_position.undo') : 'TR';
        $deleteButtonPosition = Config::get('rapyd.data_edit.button_position.delete') != '' ? Config::get('rapyd.data_edit.button_position.delete') : 'BL';

        //show
        if ($this->status == "show") {

            $this->link($this->url->replace('show' . $this->cid, 'modify' . $this->cid)->get(), trans('rapyd::rapyd.modify'), $showButtonPosition);

        }

        //modify
        if ($this->status == "modify") {
            if (in_array('update',$this->back_on)) {
                $this->link($this->back_url, trans('rapyd::rapyd.undo'), $undoButtonPosition);
            } else {
                $this->link($this->url->replace('modify' . $this->cid, 'show' . $this->cid)->replace('update' . $this->cid, 'show' . $this->cid)->get(), trans('rapyd::rapyd.undo'), $modifyButtonPosition);
            }

            $this->submit(trans('rapyd::rapyd.save'), $saveButtonPosition);
        }
        //crete
        if ($this->status == "create" && $this->action!= 'delete') {
            $this->submit(trans('rapyd::rapyd.save'), $saveButtonPosition);
        }
        //delete
        if ($this->status == "delete") {
            if (in_array('do_delete',$this->back_on)) {
                $this->link($this->back_url, trans('rapyd::rapyd.undo'), $undoButtonPosition);
            } else {
                $this->link($this->url->replace('delete' . $this->cid, 'show' . $this->cid)->replace('do_delete' . $this->cid, 'show' . $this->cid)->get(), trans('rapyd::rapyd.undo'), $deleteButtonPosition);
            }

            $do_delete_url = $this->url->replace('delete' . $this->cid, 'do_delete' . $this->cid)->get();
            $this->formButton($do_delete_url, 'delete', trans('rapyd::rapyd.delete'), $deleteButtonPosition);
        }
    }
148938
protected function renderButtons()
    {
        $buttons = [];
        foreach ($this->buttons as $button) {
            if (is_array($button)) {
                $button['view'] = $this->getView();
                $button['defaultClass'] = false;
                if (!isset($button['encodeLabel'])) {
                    $button['encodeLabel'] = $this->encodeLabels;
                }
                $buttons[] = Html::tag('li', Button::widget($button));
            } else {
                $buttons[] = Html::tag('li', $button);
            }
        }

        return implode("\n", $buttons);
    }
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);
    }
530350
public function getHeaderRowHTML()
    {
        $output = [];
        foreach ($this->columns as $name => $column) {

            // If multiple formatters are defined, use the first for the header cell
            if (is_array($column)) {
                $column = $column[0];
            }

            if (!is_int($name)) {
                $field = $this->model->getElement($name);

                $output[] = $column->getHeaderCellHTML($field);
            } else {
                $output[] = $column->getHeaderCellHTML();
            }
        }

        return implode('', $output);
    }
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;
	}
329900
public function toArray()
	{
		$array = array(
			'type' => self::TYPE_ID,
			'resource' => $this->resource,
			'title' => $this->title,
			'target' => $this->target,
			'page_master_id' => $this->pageId,
			'file_id' => $this->fileId,
			'href' => $this->href,
			'classname' => $this->classname,
			'button' => $this->isButton(),
		);

		return $array;
	}
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);
    }
398301
public function getButtonData()
    {
        $data = [];
        if ($this->getStockistId()) {
            $data = [
                'label' => __('Delete Store'),
                'class' => 'delete',
                'on_click' => 'deleteConfirm(\'' . __(
                    'Are you sure you want to do this?'
                ) . '\', \'' . $this->getDeleteUrl() . '\')',
                'sort_order' => 20,
            ];
        }
        return $data;
    }
29383
public function genEditHtmlInputs()
    {
        $return = '';

        $elementList = $this->getOrmElementList();

        if (!is_null($elementList)) {
            /** @var \DigitalWand\AdminHelper\Helper\AdminBaseHelper $linkedHelper */
            $linkedHelper = $this->getSettings('HELPER');
            foreach ($elementList as $key => $element) {
                $return .= InputType("radio", $this->getEditInputName(), $element[$linkedHelper::pk()], $this->getValue(), false, $element['TITLE']);
            }
        } else {
            $return = Loc::getMessage('DIGITALWAND_AH_ORM_MISSING_ELEMENTS');
        }

        return $return;
    }
560778
protected function getText()
    {
        if ($this->value === null) {
            $text = $this->text;
        } elseif (is_array($this->value)) {
            $text = vsprintf($this->text, $this->value);
        } else {
            $text = sprintf($this->text, $this->value);
        }

        return $text;
    }
948061
protected function getPageArray()
    {
        $range = \range($this->firstPage, $this->lastPage);
        $pageArray = [];

        foreach ($range as $page) {
            $pageArray[] = [
                'page' => $page,
                'label' => $page,
                'type' => 'page'
            ];
        }

        return $pageArray;
    }
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;
        
    }
290853
protected function getScriptText()
    {
        $actionName = Builder::escapeText($this->actionName);
        if ($this->control) {
            // Control event
            $controlId  = Builder::escapeText($this->control->getId());
            $scriptText = "
if (Event.Control.ControlId == {$controlId}) {
	TriggerPageAction({$actionName});
}";
        } else {
            // Other
            $scriptText = "
TriggerPageAction({$actionName});";
        }
        return $scriptText;
    }
859788
public function get_question_buttons() {
        $buttons = array();
        foreach ($this->attemptobj->get_slots() as $slot) {
            if ($heading = $this->attemptobj->get_heading_before_slot($slot)) {
                $buttons[] = new quiz_nav_section_heading(format_string($heading));
            }

            $qa = $this->attemptobj->get_question_attempt($slot);
            $showcorrectness = $this->options->correctness && $qa->has_marks();

            $button = new quiz_nav_question_button();
            $button->id          = 'quiznavbutton' . $slot;
            $button->number      = $this->attemptobj->get_question_number($slot);
            $button->stateclass  = $qa->get_state_class($showcorrectness);
            $button->navmethod   = $this->attemptobj->get_navigation_method();
            if (!$showcorrectness && $button->stateclass == 'notanswered') {
                $button->stateclass = 'complete';
            }
            $button->statestring = $this->get_state_string($qa, $showcorrectness);
            $button->page        = $this->attemptobj->get_question_page($slot);
            $button->currentpage = $this->showall || $button->page == $this->page;
            $button->flagged     = $qa->is_flagged();
            $button->url         = $this->get_question_url($slot);
            if ($this->attemptobj->is_blocked_by_previous_question($slot)) {
                $button->url = null;
                $button->stateclass = 'blocked';
                $button->statestring = get_string('questiondependsonprevious', 'quiz');
            }
            $buttons[] = $button;
        }

        return $buttons;
    }