Renders button - next page

@return string
@internal
328732
private function renderNextButton()
    {
        $next = $this->page->next;
        $extraClass = $next ? '' : ' not-active';
        if (empty($next)) {
            $next = $this->page->total_pages;
        }
        return $this->renderElement($next, $this->settings['label_next'], 'next'.$extraClass);
    }
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);
    }
259772
public function render()
    {
        if ($this->hasButtons()) {
            foreach ($this->buttons as $button) {
                $this->childNodes->push($button);
            }
        }

        return parent::render();
    }
1117681
protected function next_page()
    {
        $style = @$this->span_class['next'];
        if ($this->page < $this->totalpage) {
            return $this->_get_link($this->_get_url($this->page + 1), $this->next_page, $style);
        }
        return '<span class="' . $style . '">' . $this->next_page . '</span>';
    }
1246231
protected function renderButton()
    {
        Html::addCssClass($this->buttonOptions, ['widget' => 'btn']);
        $label = $this->label;
        if ($this->encodeLabel) {
            $label = Html::encode($label);
        }

        if ($this->split) {
            $buttonOptions = $this->buttonOptions;
            $this->buttonOptions['data-toggle'] = 'dropdown';
            $this->buttonOptions['aria-haspopup'] = 'true';
            $this->buttonOptions['aria-expanded'] = 'false';
            Html::addCssClass($this->buttonOptions, ['toggle' => 'dropdown-toggle dropdown-toggle-split']);
            unset($buttonOptions['id']);
            $splitButton = Button::widget([
                'label' => '<span class="sr-only">Toggle Dropdown</span>',
                'encodeLabel' => false,
                'options' => $this->buttonOptions,
                'view' => $this->getView(),
            ]);
        } else {
            $buttonOptions = $this->buttonOptions;
            Html::addCssClass($buttonOptions, ['toggle' => 'dropdown-toggle']);
            $buttonOptions['data-toggle'] = 'dropdown';
            $buttonOptions['aria-haspopup'] = 'true';
            $buttonOptions['aria-expanded'] = 'false';
            $splitButton = '';
        }

        if (isset($buttonOptions['href'])) {
            if (is_array($buttonOptions['href'])) {
                $buttonOptions['href'] = Url::to($buttonOptions['href']);
            }
        } else {
            if ($this->tagName === 'a') {
                $buttonOptions['href'] = '#';
                $buttonOptions['role'] = 'button';
            }
        }

        return Button::widget([
                'tagName' => $this->tagName,
                'label' => $label,
                'options' => $buttonOptions,
                'encodeLabel' => false,
                'view' => $this->getView(),
            ]) . "\n" . $splitButton;
    }
29452
public function render()
    {
        if ($this->dismissible) {
            $this->attributes->addAttributeClass('alert-dismissible');

            $button = new Element('button');
            $button->entity->setEntityName('button-dismiss');
            $button->attributes->addAttribute('type', 'button');
            $button->attributes->addAttributeClass('close');
            $button->attributes->addAttribute('data-dismiss', 'alert');
            $button->attributes->addAttribute('aria-label', 'close');

            $icon = new Element('span');
            $icon->entity->setEntityName('button-dismiss-icon');
            $icon->attributes->addAttribute('aria-hidden', true);
            $icon->textContent->push('&times;');

            $button->childNodes->push($icon);
        }

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

        if (isset($button)) {
            $output[] = $button;
        }

        if ($this->heading instanceof Element) {
            $this->heading->tagName = 'h4';
            $this->heading->attributes->addAttributeClass('alert-heading');
            $output[] = $this->heading;
        }

        if ($this->textContent->count()) {
            $content = PHP_EOL . implode('', $this->textContent->getArrayCopy()) . PHP_EOL;

            if ($this->heading instanceof Element) {
                $content = '<p>' . $content . '</p>';
            }

            $DOMDocument = new \DOMDocument();
            libxml_use_internal_errors(true);
            $DOMDocument->loadHTML($content, LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD);
            libxml_clear_errors();
            $links = $DOMDocument->getElementsByTagName('a');

            if ($links->length > 0) {
                foreach ($links as $link) {
                    $class = $link->getAttribute('class');
                    $class = $class . ' alert-link';

                    $link->setAttribute('class', trim($class));
                }

                $content = $DOMDocument->saveHTML();
            }

            $output[] = $content;
        }

        if ($this->hasChildNodes()) {
            if ($this->textContent->count() == 0) {
                $output[] = PHP_EOL;
            }

            foreach ($this->childNodes as $childNode) {

                if ($childNode instanceof Link) {
                    $childNode->attributes->addAttributeClass('alert-link');
                }

                $output[] = $childNode . PHP_EOL;
            }
        }

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

        return implode(PHP_EOL, $output);
    }
445722
protected function createPageButtons()
	{
		if (($pageCount = $this->getPageCount()) <= 1)
			return array();

		list ($beginPage, $endPage) = $this->getPageRange();

		$currentPage = $this->getCurrentPage(false); // currentPage is calculated in getPageRange()

		$buttons = array();

		// first page
		if ($this->displayFirstAndLast)
			$buttons[] = $this->createPageButton($this->firstPageLabel, 0, 'first', $currentPage <= 0, false);

		// prev page
		if (($page = $currentPage - 1) < 0)
			$page = 0;

		$buttons[] = $this->createPageButton($this->prevPageLabel, $page, 'previous', $currentPage <= 0, false);

		// internal pages
		for ($i = $beginPage; $i <= $endPage; ++$i)
			$buttons[] = $this->createPageButton($i + 1, $i, '', false, $i == $currentPage);

		// next page
		if (($page = $currentPage+1) >= $pageCount-1)
			$page = $pageCount-1;

		$buttons[] = $this->createPageButton($this->nextPageLabel, $page, 'next', $currentPage >= ($pageCount - 1), false);

		// last page
		if ($this->displayFirstAndLast)
			$buttons[] = $this->createPageButton($this->lastPageLabel, $pageCount - 1, 'last', $currentPage >= ($pageCount - 1), false);

		return $buttons;
	}
108864
public function render() {
	
		$ret = '<button type="' . $this->type . '"' ;
	
		if ($this->id) {
			$ret .= 'id=' . $this->id;
		}
	
		if ($this->name) {
			$ret .= ' ' . $this->getNameProperty();
		}
	
		$ret .= $this->processProperties() . '>';
	
		if ($this->faIcon) {
			$ret .= '<i class="fa ' . $this->faIcon . '"></i> ';
		}
	
		$ret .= trim(htmlspecialchars($this->value)) . ' </button>';
	
		return $ret;
	
	}
912142
protected function getPreviousButton()
    {
        if ($this->paginator->currentPage() <= 1) {
            return $this->getDisabledLink($this->previousButtonText);
        }

        $url = $this->paginator->url(
            $this->paginator->currentPage() - 1
        );

        return $this->getPrevNextPageLinkWrapper($url, $this->previousButtonText, 'prev');
    }
604713
public function renderButton()
	{
		try {
			// Renderer function may be used
			return $this->useRenderer();
		} catch (DataGridColumnRendererException $e) {
			// Do not use renderer
		}

		$link = $this->createLink($this->grid, $this->href, $this->params);

		$a = Html::el('a')->href($link);

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

		if (!empty($this->attributes)) {
			$a->addAttributes($this->attributes);
		}

		$a->addText($this->grid->getTranslator()->translate($this->text));

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

		if ($this->getClass()) {
			$a->class($this->getClass());
		}

		return $a;
	}
81140
public function render()
	{
		$paginator = $this->getPaginator();
		$page = $paginator->page;

		if ($paginator->pageCount < 2) {
			$steps = [$page];

		} else {
			$arr = range(max($paginator->firstPage, $page - 2), min($paginator->lastPage, $page + 2));

			/**
			 * Something to do with steps in tempale...
			 * [Default $count = 3;]
			 * @var int
			 */
			$count = 1;

			$quotient = ($paginator->pageCount - 1) / $count;
			for ($i = 0; $i <= $count; $i++) {
				$arr[] = round($quotient * $i) + $paginator->firstPage;
			}
			sort($arr);
			$steps = array_values(array_unique($arr));
		}

		$this->template->setTranslator($this->translator);

		if (!isset($this->template->steps)) {
			$this->template->add('steps', $steps);
		}

		if (!isset($this->template->paginator)) {
			$this->template->add('paginator', $paginator);
		}

		//$this->template->add('icon_prefix', $this->icon_prefix);
		$this->template->icon_prefix = $this->icon_prefix;
		//$this->template->add('original_template', $this->getOriginalTemplateFile());
		$this->template->original_template = $this->getOriginalTemplateFile();
		$this->template->setFile($this->getTemplateFile());
		$this->template->render();
	}
584704
public function getNextPage()
    {
        $nextPage = $this->getPage() + 1;
        $lastPage = $this->getLastPage();
        if ($lastPage < $nextPage) {
            $nextPage = $lastPage;
        }

        return $nextPage;
    }
766488
public function renderButtons()
	{
		$output='';
		foreach($this->getButtons() as $button)
			$output.=$this->renderElement($button);
		return $output!=='' ? "<div class=\"row buttons\">".$output."</div>\n" : '';
	}
806218
public function render()
    {
        //calculate iteration
        $iteration = (int) ceil($this->total/$this->per_page) + $this->config['start_page'] - 1 ;

        if($iteration==0)
            return;
        $item_to_show = $this->config['item_to_show'];
        $first_item_max = $item_to_show  -1 ;
        $last_item_min = $iteration +1 - $item_to_show ;
        $print_array = array();
        if($this->config['skip_item']){
            //calculate pagination print
            for($i=0;$i<=$first_item_max;$i++){
                $print_array[$i] = true;
            }
            for($i=$last_item_min;$i<=$iteration;$i++){
                $print_array[$i] = true;
            }
            if(!isset($print_array[$this->current_page-$item_to_show-1])){
                $print_array[$this->current_page-$item_to_show-1]='skip';
            }
            if(!isset($print_array[$this->current_page+$item_to_show+1])){
                $print_array[$this->current_page+$item_to_show+1]='skip';
            }
            for($i=$this->current_page;$i<=$this->current_page+$item_to_show;$i++){
                $print_array[$i] = true;
            }
            for($i=$this->current_page-$item_to_show;$i<=$this->current_page;$i++){
                $print_array[$i] = true;
            }
        }
        for( $i=$this->config['start_page'] ; $i<=$iteration   ; $i++){
            if($this->config['skip_item']){
                if(!isset($print_array[$i]))
                    continue;
                if($print_array[$i]==='skip'){
                    echo $this->config['skip_tag_open'];
                    echo "{$this->config['skip_tag_text']}";
                    echo $this->config['skip_tag_close'];
                    continue;
                }
            }
            
            $page_number = $i+1 - $this->config['start_page'];
                        
            //prev
            if( $i == $this->config['start_page'] && $this->current_page != $this->config['start_page'] ){
                // if($this->current_page == 1 )
                    // $prev_url = str_replace('$paginate','', $this->base_url);
                // if($i!=$this->current_page)
                    $prev_url = str_replace('$paginate',$this->current_page-1, $this->base_url);
                // else
                    // $prev_url ="#";
                echo $this->config['prev_tag_open'];
                echo "<a href='{$prev_url}' $this->config['link_attribute'] >{$this->config['prev_tag_text']}</a>";
                echo $this->config['prev_tag_close'];
            }
            $url = str_replace('$paginate',$i, $this->base_url);
            //current
            if($i==$this->current_page){
                echo $this->config['cur_tag_open'];
                echo "<a href='{$url}' $this->config['link_attribute_active'] >$page_number </a>";
                echo $this->config['cur_tag_close'];
            }
            //first
            elseif($i==$this->config['start_page'] ){
                // $url = str_replace('$paginate','', $this->base_url);
                echo $this->config['first_tag_open'];
                echo "<a href='{$url}' $this->config['link_attribute'] >$page_number </a>";
                echo $this->config['first_tag_close'];
            }
            //last
            elseif($i==$iteration){
                echo $this->config['last_tag_open'];
                echo "<a href='{$url}' $this->config['link_attribute'] >$page_number </a>";
                echo $this->config['last_tag_close'];
            }
            
            else{
                echo $this->config['num_tag_open'];
                echo "<a href='{$url}' $this->config['link_attribute'] >$page_number </a>";
                echo $this->config['num_tag_close'];
            }
            
            //next
            if($i==$iteration){
                if($i!=$this->current_page)
                    $next_url = str_replace('$paginate',$this->current_page+1, $this->base_url);
                else
                    $next_url="#";
                echo $this->config['next_tag_open'];
                echo "<a href='{$next_url}' $this->config['link_attribute'] >{$this->config['next_tag_text']}</a>";
                echo $this->config['next_tag_close'];
            }
            $print_skip = true;
            
        }
    }
1347515
protected function render(): string
    {
        switch ($this->mode) {
            case 'button':
                $html = '<button class="btn' . $this->classes() . '" type="submit"' .
                    (($this->disabled === true) ? ' disabled' : null) .
                    '>' . $this->label . '</button>';
                break;

            case 'input':
                $html = '<input class="btn' . $this->classes() . '" type="' .
                    $this->input_type . '" value="' .
                    $this->label . '" ' .
                    (($this->disabled === true) ? ' disabled ' : null) . '/>';
                break;

            default:
                $html = '<a href="' . (($this->uri !== null) ? $this->uri : '#') .
                    '" class="btn' . $this->classes() .
                    (($this->disabled === true) ? ' disabled' : null) .
                    '" role="button">' . $this->label . '</a>';
                break;
        }

        return $html;
    }
1082025
public function render()
    {
        if ($this->options['enableListButton']) {
            $this->add($this->listButton());
        }

        if ($this->options['enableBackButton']) {
            $this->add($this->backButton());
        }

        return $this->tools->map(function ($tool) {
            if ($tool instanceof Renderable) {
                return $tool->render();
            }

            if ($tool instanceof Htmlable) {
                return $tool->toHtml();
            }

            return (string) $tool;
        })->implode(' ');
    }
181703
public function render() {

		$this->set_footers();

		add_action( 'admin_footer', array( $this, 'output_templates' ) );
		add_action( 'wp_footer', array( $this, 'output_templates' ) );

		$output = '<button ' . $this->build_attributes() . '>' . $this->struct['label'] . '</button>';

		$this->templates .= $this->render_modal_template();

		return $output;
	}