Rendering the widget dropdown.
Default page size is 20.
@return string
160943
public function run()
    {
        $size = 20;
        $saved = Yii::$app->session->get('per-page');
        if (in_array($saved, $this->pageSizes)) {
            $size = $saved;
        }
        $selected = Yii::$app->request->get('per-page');
        if (in_array($selected, $this->pageSizes)) {
            $size = $selected;
        }

        Yii::$app->session->set('per-page', $size);

        return Html::tag('div', Html::tag('div',
            Html::label(Yii::t('podium/view', 'Results per page'), 'per-page')
            . ' '
            . Html::dropDownList('per-page', $size, $this->pageSizes, ['class' => 'form-control input-sm', 'id' => 'per-page']),
            ['class' => 'form-group']
        ), ['class' => 'pull-right form-inline']) . '<br><br>';
    }
1325417
protected function _getListOptionsForElem() {
		$cachePath = 'DefaultOptions_Filter_' . $this->_currUIlang;
		$cached = Cache::read($cachePath, CAKE_THEME_CACHE_KEY_HELPERS);
		if (!empty($cached)) {
			return $cached;
		}

		$inputSize = '';
		$btnSize = '';
		$formInputSize = $this->_getFormInputSize();
		if (!empty($formInputSize)) {
			$inputSize = ' input-' . $formInputSize;
			$btnSize = ' btn-' . $formInputSize;
		}
		$emptyText = $this->ViewExtension->showEmpty('');

		$result = [];
		$result['openFilterForm'] = [
			'role' => 'form',
			'class' => 'filter-form clone-wrapper',
			'autocomplete' => 'off',
			'data-max-clone' => CAKE_THEME_FILTER_ROW_LIMIT
		];
		$result['paginTableRowHeaderActTitle'] = __d('view_extension', 'Actions');
		$result['createFilterTableRow'] = [
			'commonOptions' => [
				'label' => false,
				'required' => false,
				'secure' => false,
				'class' => 'form-control' . $inputSize
			],
			'filterText' => __d(
				'view_extension',
				'Data filter for the table: %s',
				$this->Html->tag(
					'code',
					$emptyText,
					[
						'data-toggle' => 'filter-conditions',
						'data-empty-text' => $emptyText
					]
				)
			),
			'showFilterBtn' => $this->ViewExtension->button(
				'far fa-caret-square-down',
				'btn-default',
				['class' => 'show-filter-btn',
					'title' => __d('view_extension', 'Show or hide filter'),
					'data-toggle' => 'collapse', 'data-target' => '.filter-collapse',
					'aria-expanded' => 'false',
					'data-toggle-icons' => 'fa-caret-square-down,fa-caret-square-up'
				]
			),
			'applyFilterBtn' => $this->ViewExtension->button(
				'fas fa-filter',
				'btn-info',
				[
					'type' => 'submit',
					'class' => 'exclude-clone filter-apply',
					'title' => __d('view_extension', 'Apply filter'),
					'data-toggle' => 'tooltip',
					'value' => 'filter-apply',
					'name' => 'data[FilterAction]'
				]
			),
			'clearFilterBtn' => $this->ViewExtension->button(
				'fas fa-eraser',
				'btn-warning',
				[
					'type' => 'reset',
					'class' => 'exclude-clone filter-clear',
					'title' => __d(
						'view_extension',
						'Clear filter'
					),
					'data-toggle' => 'tooltip'
				]
			),
			'addRowBtn' => $this->ViewExtension->button(
				'fas fa-plus',
				'btn-success',
				[
					'title' => __d('view_extension', 'Add row of filter'),
					'data-toggle' => 'btn-action-clone'
				]
			),
			'deleteRowBtn' => $this->ViewExtension->button(
				'fas fa-trash-alt',
				'btn-danger',
				[
					'title' => __d('view_extension', 'Delete row of filter'),
					'data-toggle' => 'btn-action-delete'
				]
			),
			'printBtnOptions' => [
				'title' => __d('view_extension', 'Print informations'),
				'data-toggle' => 'tooltip',
				'target' => '_blank'
			],
			'exportBtnOptions' => [
				'title' => __d('view_extension', 'Export informations'),
				'data-toggle' => 'tooltip'
			],
			'tableHeaderOptions' => [
				'data-toggle' => 'clone-source',
				'class' => 'filter-collapse collapse filter-controls-row'
			]
		];
		$result['createGroupActionControls'] = [
			'selectAllBtn' => $this->ViewExtension->button(
				'far fa-check-square',
				'btn-info',
				['escape' => false, 'class' => 'hidden-print',
					'title' => __d('view_extension', 'Select / deselect all'),
					'data-toggle' => 'btn-action-select-all',
					'data-toggle-icons' => 'fa-check-square,fa-square']
			),
			'groupDataProcTitle' => $this->Html->tag('strong', __d('view_extension', 'Group data processing')),
			'performActionBtn' => [
				'type' => 'submit',
				'escape' => false,
				'title' => __d('view_extension', 'Perform action'),
				'data-toggle' => 'tooltip', 'value' => 'group-action',
				'name' => 'data[FilterAction]', 'data-dialog-title' => __d('view_extension', 'Action to perform'),
				'data-dialog-sel-placeholder' => __d('view_extension', 'Select a action'),
				'data-dialog-btn-ok' => __d('view_extension', 'Perform'),
				'data-dialog-btn-cancel' => __d('view_extension', 'Cancel')
			],
		];
		$result['getBtnConditionField'] = [
			'options' => [
				'' => ['name' => '=', 'title' => '=',
					'data-subtext' => __d('view_extension', 'Equal'), 'value' => ''],
				'gt' => ['name' => '&gt;', 'title' => '&gt;',
					'data-subtext' => __d('view_extension', 'Greater than'), 'value' => 'gt'],
				'ge' => ['name' => '&ge;', 'title' => '&ge;',
					'data-subtext' => __d('view_extension', 'Greater than or equal to'), 'value' => 'ge'],
				'lt' => ['name' => '&lt;', 'title' => '&lt;',
					'data-subtext' => __d('view_extension', 'Less than'), 'value' => 'lt'],
				'le' => ['name' => '&le;', 'title' => '&le;',
					'data-subtext' => __d('view_extension', 'Less than or equal to'), 'value' => 'le'],
				'ne' => ['name' => '&ne;', 'title' => '&ne;',
					'data-subtext' => __d('view_extension', 'Not equal'), 'value' => 'ne'],
			],
			'title' => __d('view_extension', 'Change the logical condition of the field')
		];
		$result['getBtnConditionGroup'] = [
			'options' => [
				'' => ['name' => '&nbsp;&&', 'title' => '&nbsp;&&', 'data-subtext' => __d('view_extension', 'And'), 'value' => ''],
				'or' => ['name' => '&nbsp;||', 'title' => '&nbsp;||', 'data-subtext' => __d('view_extension', 'Or'), 'value' => 'or'],
				'not' => ['name' => '&nbsp;!', 'title' => '&nbsp;!', 'data-subtext' => __d('view_extension', 'Not'), 'value' => 'not'],
			],
			'title' => __d('view_extension', 'Change the logical condition of the group')
		];
		$result['getBtnCondition'] = [
			'type' => 'select',
			'title' => __d('view_extension', 'Changing the filter condition'),
			'style' => 'btn-default btn-filter-condition' . $btnSize,
			'width' => 'fit',
			'live-search' => false,
			'class' => 'form-control show-tick filter-condition' . $inputSize,
			'autocomplete' => 'off',
			'div' => false,
			'label' => false,
			'escape' => false,
			'required' => false,
			'secure' => false,
		];
		$result['prepareOptions'] = [
			'select' => [
				'empty' => '--' . __d('view_extension', 'Sel.') . '--',
				'style' => 'btn-default' . $btnSize
			],
			'string' => [
				'div' => false,
				'type' => 'autocomplete',
				'url' => $this->url(
					$this->ViewExtension->addUserPrefixUrl([
						'controller' => 'filter',
						'action' => 'autocomplete',
						'plugin' => 'cake_theme',
						'ext' => 'json',
						'prefix' => false
					])
				)
			],
			'integer' => [
				'div' => 'input-group'
			],
			'boolean' => [
				'options' => $this->ViewExtension->yesNoList(),
				'type' => 'select',
				'style' => 'btn-default' . $btnSize,
				'empty' => '--' . __d('view_extension', 'Sel.') . '--'
			],
			'date' => [
				'div' => 'input-group',
				'widget-position-vertical' => 'bottom',
				'icon-type' => 'false',
			],
			'binary' => [
				'disabled' => true
			]
		];
		Cache::write($cachePath, $result, CAKE_THEME_CACHE_KEY_HELPERS);

		return $result;
	}
1113768
public function actionIndex()
    {
        $model = new MediaConfigurationForm();
        $model->thumbnail_size_width = Media::getConfigurationThumbnailSizeWidth();
        $model->thumbnail_size_height = Media::getConfigurationThumbnailSizeHeight();
        $model->medium_size_width = Media::getConfigurationMediumSizeWidth();
        $model->medium_size_height = Media::getConfigurationMediumSizeHeight();
        $model->large_size_width = Media::getConfigurationLargeSizeWidth();
        $model->large_size_height = Media::getConfigurationLargeSizeHeight();
        $model->quality = Media::getConfigurationQuality();
        if ($model->load(\request()->post())) {
            if ($model->config()) {
                set_flash_has_been_saved();

                return $this->redirect(Url::to(['index']));
            } else {
                set_flash_has_not_been_saved();

                return $this->render('index', ['model' => $model]);
            }
        } else {
            return $this->render('index', ['model' => $model]);
        }
    }
1242076
public function getPage()
    {
        $page = isset($this->requestParams[self::PARAM_PAGE]) ? $this->requestParams[self::PARAM_PAGE] : self::DEFAULT_PAGE;
        return (integer)$page;
    }
101679
public function render() {

		$output = '<div id="' . esc_attr( $this->id() ) . '" class="uix-control uix-control-' . esc_attr( $this->type ) . ' ' . esc_attr( $this->id() ) . '">';

		$output .= $this->label();
		$output .= '<div class="uix-control-input">';
		$output .= $this->input();
		$output .= '</div>';
		$output .= $this->description();

		$output .= '</div>';

		return $output;
	}
1071333
public function getDefaultPages()
    {
        if ($this->defaultPages != null) {
            return $this->defaultPages;
        }
        $this->defaultPages = [];
        /** @noinspection PhpUndefinedFieldInspection */
        if ($this->configFile->defaultPages->getName()) {
            /** @noinspection PhpUndefinedFieldInspection */
            foreach ($this->configFile->defaultPages->page as $page) {
                $title = (string)$page;
                $this->defaultPages[$title]["template"] = (string)$page["template"];
                $this->defaultPages[$title]["alias"] = (string)$page["alias"];
                $this->defaultPages[$title]["id"] = (string)$page["id"];
            }

        }

        return $this->defaultPages;
    }
507915
public function render()
    {
        // returning empty string if the num pages is zero
        if ($this->pages == 0 || $this->pages == 1) {
            return '';
        }

        $output[] = $this->open() . PHP_EOL;

        $current = (int)input()->get('page');
        $current = $current == 0 ? 1 : $current;

        $previous = new Element('span');
        $previous->entity->setEntityName('previous');
        $previous->attributes->addAttribute('aria-hidden', true);
        $previous->textContent->push('&laquo;');

        if ($current == 1) {
            $this->createList(new Link($previous, '#'));
            $this->childNodes->current()->disabled();
        } else {
            $this->createList(new Link($previous, current_url('', ['page' => $current - 1])));
        }

        foreach (range(1, $this->pages) as $page) {
            $this->createList(new Link($page, current_url('', ['page' => $page])));

            if ($current == $page) {

                $currentNode = $this->childNodes->current();
                $currentNode->active();

                $srOnly = new Element('span');
                $srOnly->entity->setEntityName('current');
                $srOnly->attributes->addAttributeClass('sr-only');
                $srOnly->textContent->push('(current)');

                $currentNode->childNodes->first()->childNodes->push($srOnly);
            }
        }

        $next = new Element('span');
        $next->entity->setEntityName('next');
        $next->attributes->addAttribute('aria-hidden', true);
        $next->textContent->push('&raquo;');

        if ($current == $this->pages) {
            $this->createList(new Link($next, '#'));
            $this->childNodes->current()->disabled();
        } else {
            $this->createList(new Link($next, current_url('', ['page' => $current + 1])));
        }

        if ($this->hasChildNodes()) {
            $output[] = implode(PHP_EOL, $this->childNodes->getArrayCopy());
        }

        $output[] = PHP_EOL . $this->close();

        return implode('', $output);
    }
365580
public function preview()
	{
		$sizes = \System::getContainer()->get('contao.image.image_sizes')->getAllOptions();
		$size = StringUtil::deserialize($this->size);
		
		if (is_numeric($size[2]))
		{
			return '<div class="widget"><span style="color:#b3b3b3 ">' . $sizes['image_sizes'][$size[2]] . '</span></div>';
		}
		else
		{
			return '<div class="widget"><span style="color:#b3b3b3 ">' . $GLOBALS['TL_LANG']['MSC'][$size[2]][0] . ' (' . $size[0] . 'x' . $size[1] . ')</span></div>';
		}
	}
845795
public function render(): string {
		$out = $this->before();
		foreach ( $this->_widgets as $widget ) {
			$out .= $widget->render();
		}
		$out .= $this->after();

		$this->content = $out;

		return $this->template ? render( $this->template, $this->getAttributes() ) : $out;
	}
417275
protected function _getViewListSize()
    {
        if (!$this->_iViewListSize) {
            $config = \OxidEsales\Eshop\Core\Registry::getConfig();
            if ($profile = \OxidEsales\Eshop\Core\Registry::getSession()->getVariable('profile')) {
                if (isset($profile[1])) {
                    $config->setConfigParam('iAdminListSize', (int)$profile[1]);
                }
            }

            $this->_iViewListSize = (int)$config->getConfigParam('iAdminListSize');
            if (!$this->_iViewListSize) {
                $this->_iViewListSize = 10;
                $config->setConfigParam('iAdminListSize', $this->_iViewListSize);
            }
        }

        return $this->_iViewListSize;
    }
529484
public function render() {
		$result = \HTML::wizard([
			'type' => $this->options['wizard']['type'] ?? null,
			'step' => $this->options['input']['__wizard_step'] ?? null,
			'options' => $this->options['wizard']['options'] ?? []
		]);
		if (!empty($result)) {
			$result.= \HTML::hr();
		}
		return $result;
	}
1093042
public function renderFooter()
    {
        if (!$this->isAddButtonPositionFooter()) {
            return '';
        }

        $cells = [];
        $cells[] = Html::tag('td', '&nbsp;');
        $cells[] = Html::tag('td', $this->renderAddButton(), [
            'class' => 'list-cell__button'
        ]);

        return Html::tag('tfoot', Html::tag('tr', implode("\n", $cells)));
    }
938666
public function render() {
		
		$router = Router::getInstance();
		
		// count can’t be null
		if (!$this->count) {
			return '';
		}
		
		// round the page count
		$pages = (int)ceil((int)$this->count / $this->perPage);
		
		// hide bar in case of 1 page only
		if ($pages < 2 and $this->hideEmpty) {
			return '';
		}
		
		// start main pagination DOM object
		$render = '<div class="pagination"><nav aria-label="Page navigation"><ul class="pagination">';
		
		// left arrow for first page
		if ($this->page > 1) {
			$render .= '<li class="page-item arrow"><a class="page-link" href="' . $router->getPageUrl(1) . '">«</a></li>';
		}

		// calculate page range
		if ($this->page > 5 and $this->page+5 > $pages) {
			$max = $pages;
			$min = ($max-10) > 0 ? $max-10 : 1;
		} else if ($this->page <= 5) {
			$min = 1;
			$max = $pages < 10 ? $pages : 10;
		} else {
			$min = ($this->page-5) > 0 ? $this->page-5 : 1;
			$max = ($this->page+5 <= $pages) ? $this->page+5 : $pages;
		}

		// render all pages number
		for ($i=$min; $i <= $max; $i++) {
			
			if ($i==$this->page) {
				$render .= '<li class="page-item current active"><a class="page-link" href="' . $router->getPageUrl($i) . '">' . $i . '</a></li>';
			} else {
				$render .= '<li class="page-item"><a class="page-link" href="' . $router->getPageUrl($i) . '">' . $i . '</a></li>';
			}
			
		}
		
		// right arrow for last page
		if ($this->page < $pages) {
			$render .= '<li class="page-item arrow"><a class="page-link" href="' . $router->getPageUrl($pages) . '">»</a></li>';
		}
		
		// close the bar
		$render .= '</ul></nav></div>';
		
		return $render;
		
	}
852279
public function renderField()
    {
        list($name, $id) = $this->resolveNameID();

        TbArray::defaultValue('id', $id, $this->htmlOptions);
        TbArray::defaultValue('name', $name, $this->htmlOptions);

        if ($this->useHelperSelectBox) {
            $select = Yii::createComponent(
                CMap::mergeArray(
                    $this->helperOptions,
                    array(
                        'class' => 'yiiwheels.widgets.formhelpers.WhSelectBox',
                        'htmlOptions' => $this->htmlOptions,
                        'model' => $this->model,
                        'attribute' => $this->attribute,
                        'name' => $this->name,
                        'value' => $this->value,
                        'wrapperOptions' => array(
                            'class' => 'bfh-fonts',
                            'data-family' => $this->hasModel() ? $this->model->{$this->attribute} : $this->value,
                        )
                    )
                )
            );
            $select->init();
            $select->run();
        } else {
            $this->htmlOptions['data-family'] = $this->hasModel()
                ? $this->model->{$this->attribute}
                : $this->value;

            if ($this->hasModel()) {
                echo CHtml::activeDropDownList($this->model, $this->attribute, array(), $this->htmlOptions);
            } else {
                echo CHtml::dropDownList($name, $this->value, array(), $this->htmlOptions);
            }
        }
    }
304229
public function field()
    {
        $optionsCode = '';

        if (is_array($this->options['options'])) {
            foreach ($this->options['options'] as $key => $value) {
                $optionsCode .= '<option value="'.$key.'"'.($this->value == $key ?
                    ' selected="selected"' : null).'>'.
                    $value.'</option>';
            }
        } elseif ($optionClass = $this->options['options']) {
            $options = $optionClass::orderBy((isset($this->options['optionsSort']) ? $this->options['optionsSort'] : 'id'),
                                              (isset($this->options['optionsSortOrder']) ? $this->options['optionsSortOrder'] : 'asc'))->get();

            foreach ($options as $option) {
                $optionValue = isset($this->options['optionsValue']) ? $this->options['optionsValue'] : 'id';
                $optionShow = isset($this->options['optionsShow']) ? $this->options['optionsShow'] : 'name';

                $optionsCode .= '<option value="'.$option->$optionValue.'"'.($this->value == $option->$optionValue ?
                    ' selected="selected"' : null).'>'.
                    $option->$optionShow.'</option>';
            }
        }

        $input = new HTMLBrick('select', $optionsCode, [
            'id'   => $this->id,
            'name' => $this->name,
        ]);
        $input->addClass('form-control');

        return $input;
    }
718556
public function renderLengthPicker()
    {
        $pagination = $this->dataProvider->getPagination();
        if ($pagination === false || $this->dataProvider->getCount() <= 0) {
            return '';
        }
        $pagination->totalCount = $this->dataProvider->getTotalCount();
        $choices = [];
        foreach ([10, 25, 50] as $value) {
            $cssClass = $value === $pagination->pageSize ? 'active' : '';
            $url = $pagination->createUrl($pagination->getPage(), $value);
            $choices[] = '<li class="'.$cssClass.'"><a href="' . $url . '">' . $value . '</a></li>';
        }
        return Html::tag('ul', implode("\n", $choices), $this->lengthPickerOptions);
    }
17217
private function renderFooter()
    {
        if (!$this->paginator) {
            return "";
        }
        if (count($this->columns) == 0) {
            return "";
        }
        $currentpage = $this->currentpage;

        $content = '<ul class="pagination">';
        $pages = $this->getPageCount();
        if ($pages <= 1)
            return '';

        if ($currentpage - $this->firstButton > $this->maxbuttons) {

            $this->firstButton = $currentpage - $this->maxbuttons;
        }
        if ($currentpage < $this->firstButton) {
            $this->firstButton = $currentpage - 1;
        }

        if ($this->firstButton > 1) {
            $content .= "<li  class=\"page-item\"><a   class=\"page-link\"  href='void(0);' onclick=\"" . $this->getPaginatorLink(1) . "\"><span aria-hidden=\"true\">&laquo;</span></a></li>";
            $content .= "<li class=\"page-item\"><a   class=\"page-link\"  href='void(0);' onclick=\"" . $this->getPaginatorLink($currentpage - 1) . "\"><span aria-hidden=\"true\">&lsaquo;</span></a></li>";
            $content .= "<li  class=\"page-item\"><a   class=\"page-link\" href=\"javascript:void(0);\" >&hellip;</a></li>";
        }



        for ($i = $this->firstButton; $i <= $this->firstButton + $this->maxbuttons; $i++) {
            if ($i > $pages)
                break;
            if ($currentpage == $i) {
                $content .= "<li class=\"page-item active\"><a  class=\"page-link\"  href=\"javascript:void(0);\" > {$i} </a></li>";
            } else {
                $content .= "<li  class=\"page-item\"><a   class=\"page-link\" href=\"javascript:void(0);\"  onclick=\"" . $this->getPaginatorLink($i) . "\"> {$i} </a></li>";
            }
        }

        if ($pages > $this->firstButton + $this->maxbuttons) {
            $content .= "<li  class=\"page-item\" ><a   class=\"page-link\" href=\"javascript:void(0);\" >&hellip;</a></li>";
            $content .= "<li  class=\"page-item\"><a  class=\"page-link\" href='void(0);' onclick=\"" . $this->getPaginatorLink($currentpage + 1) . "\"aria-label=\"Next\">       <span aria-hidden=\"true\">&rsaquo;</span></a></li>";
            $content .= "<li  class=\"page-item\"><a  class=\"page-link\" href='void(0);' onclick=\"" . $this->getPaginatorLink($pages) . "\"aria-label=\"Next\">       <span aria-hidden=\"true\">&raquo;</span></a></li>";
        }
        
        $countall = $this->getAllRowsCount();
        $show =  $currentpage * $this->pagesize;
        if($pages ==$currentpage) $show = $countall;
        if($countall <= $this->pagesize) $show = $countall;
        
        $content = "<table  ><tr><td valign='middle'>{$show} строк с  {$countall} &nbsp;&nbsp;&nbsp;&nbsp;</td><td align='right'> {$content}</td></tr></table>";
        return "<tr ><td class=\"footercell\"  colspan=\"" . count($this->columns) . "\" >{$content}</ul></td></tr>";
    }