Set button as HTML link object <a href="">.

@param string $page
@param array  $args

@return $this
127
public function link($page, $args = array())
    {
        $this->setElement('a');
        $this->setAttr('href', $this->app->url($page, $args));

        return $this;
    }
798561
public function set(array $methods, array $args): RouterInterface
    {
        list($pattern, $callable) = $args;
        $route = new Route($methods, $pattern, $callable);
        $this->setRoute($route);
        return $this;
    }
599078
public function textareaRow(array $args = [])
    {
        $default_args = [
            // Required.
            'label' => '',

            // Suggested.
            'tip' => '',

            // Required.
            'name'  => '',
            'value' => '',

            // Optional.
            'placeholder' => '',
            'note'        => '',

            // Optional.
            'class' => '',
            'style' => '',
            'attrs' => '',

            // Optional.
            'if' => '',
        ];
        if (!array_key_exists('value', $args)) {
            throw $this->c::issue('Missing `value` key.');
        }
        $cfg = array_merge($default_args, $args);
        $cfg = array_intersect_key($cfg, $default_args);
        $cfg = array_map('strval', $cfg);

        if (!$cfg['name']) {
            throw $this->c::issue('Arg `name` is required.');
        }
        $cfg['var_name'] = $cfg['name']; // Internal copy.
        $cfg['id']       = $this->elementId($cfg['var_name']);
        $cfg['name']     = $this->elementName($cfg['var_name']);
        $cfg['class']    = $this->c::mbTrim($cfg['class'].' '.$this->elementClass($cfg['var_name']));

        $cfg['tip']  = $cfg['tip'] ? $this->s::menuPageTip($cfg['tip']) : '';
        $cfg['note'] = $cfg['note'] ? $this->s::menuPageNote($cfg['note']) : '';

        $markup = '<tr'.($cfg['if'] ? ' data-if="'.esc_attr($cfg['if']).'"' : '').'>';

        if ($cfg['label']) {
            $markup .= '<th scope="row">';
            $markup .= '<div>'; // For positioning.
            $markup .= $cfg['tip'];
            $markup .= '<label for="'.esc_attr($cfg['id']).'" title="'.esc_attr($cfg['label']).'">'.
                            $cfg['label'].
                       '</label>';
            $markup .= '</div>';
            $markup .= '</th>';
        }
        $markup .= '<td'.(!$cfg['label'] ? ' colspan="2"' : '').'>';
        $markup .= '<div>'; // For positioning.
        $markup .= '<textarea'.
                        ' name="'.esc_attr($cfg['name']).'" id="'.esc_attr($cfg['id']).'"'.
                        ' class="'.esc_attr($cfg['class']).'" style="'.esc_attr($cfg['style']).'"'.
                        ' placeholder="'.esc_attr($cfg['placeholder']).'" autocomplete="new-password"'.
                        ($cfg['attrs'] ? ' '.$cfg['attrs'] : '').
                        '>'.esc_textarea($cfg['value']).'</textarea>';
        $markup .= $cfg['note'];
        $markup .= '</div>';
        $markup .= '</td>';

        $markup .= '</tr>';

        return $markup;
    }
803886
public function setPage(\Core\Entity\MenuPage $page = null) {
        $this->page = $page;

        return $this;
    }
1299456
public function initPage(Page $page)
	{
		/* @var $annotations PageUrlAnnotation[] */
		$annotations = $this->annotationManager->getClassAnnotations($page, '@page-url');

		if ( !$annotations || !($annotations[0] instanceof PageUrlAnnotation) ) {
			return $this;
		}

		$page->setUrlBuilder(
			$this->urlFactory->getBuilder(
				$this->urlNormalizer->normalize($annotations[0])
			)
		);

		return $this;
	}
359290
public function bootstrapAlertLinkFunction(array $args = []) {

        $attributes = [];

        $attributes["href"] = ArrayHelper::get($args, "href", NavigationInterface::NAVIGATION_HREF_DEFAULT);

        $innerHTML = ArrayHelper::get($args, "content");

        return static::coreHTMLElement("a", $innerHTML, $attributes);
    }
408428
public function setPage($page)
    {
        $this->stateChanged = true;
        $path = $this->prefixWithNamespace('page');
        $this->argumentsAccessor->set($path, $page);
        return $this;
    }
691306
public function widget($args, $instance)
    {
        
        /*
         * Put the pages to show into the instance var.
         */
        $instance['pages'] = Post::getPages();
        
        /*
         * And call the widget func from the parent class WidgetBase.
         */
        parent::widget($args, $instance);
    }
839689
private function url($page)
	{
		$param=$this->param;
		$param[$this->pageField]=$page;
		echo Dispatch::url($this->rule,$param);
	}
1196797
protected function changePage($page)
    {
        $this->currentPage = $page;
        $this->manialinkFactory->update($this->manialink->getUserGroup());
    }
676424
public function setPage(\Fulgurio\LightCMSBundle\Entity\Page $page = null)
    {
        $this->page = $page;

        return $this;
    }
559024
public function allowPage($page)
    {
        if (is_array($page)) {
            foreach ($page as $p) {
                $this->allowPage($p);
            }

            return $this;
        }
        $this->allowed_pages[] = $page;

        return $this;
    }
825708
public function addMenu(array $args = [])
    {
        $default_args = [
            'auto_prefix'   => true,
            'page_title'    => '',
            'menu_title'    => '',
            'capability'    => '',
            'page'          => '',
            'class'         => '',
            'template_file' => '',
            'template_dir'  => '',
            'icon'          => '',
            'position'      => null,
            'meta_links'    => [],
            'tabs'          => [],
            'callback'      => null,
        ];
        $cfg = (object) array_merge($default_args, $args);

        $cfg->auto_prefix   = (bool) $cfg->auto_prefix;
        $cfg->page_title    = (string) $cfg->page_title;
        $cfg->menu_title    = (string) $cfg->menu_title;
        $cfg->capability    = (string) $cfg->capability;
        $cfg->page          = (string) $cfg->page;
        $cfg->class         = (string) $cfg->class;
        $cfg->template_file = (string) $cfg->template_file;
        $cfg->template_dir  = (string) $cfg->template_dir;
        $cfg->icon          = (string) $cfg->icon;
        $cfg->position      = (string) $cfg->position;
        $cfg->meta_links    = (array) $cfg->meta_links;
        $cfg->tabs          = (array) $cfg->tabs;

        if ($cfg->page_title && $cfg->auto_prefix // Smart auto-prefixing.
                && $cfg->page_title !== $this->App->Config->©brand['©name']) {
            $cfg->page_title = $cfg->page_title.' | '.$this->App->Config->©brand['©name'];
        } elseif (!$cfg->page_title) {
            $cfg->page_title = $this->App->Config->©brand['©name'];
        }
        if (!$cfg->menu_title) {
            $cfg->menu_title = $this->App->Config->©brand['©name'];
        }
        if (!$cfg->capability) {
            $cfg->capability = $this->App->Config->§caps['§manage'];
        }
        if ($cfg->page && $cfg->auto_prefix // Smart auto-prefixing.
                && $cfg->page[0] !== '/' && mb_stripos($cfg->page, '.php') === false) {
            $cfg->page = $this->App->Config->©brand['©slug'].'-'.$cfg->page;
        } elseif (!$cfg->page) {
            $cfg->page = $this->App->Config->©brand['©slug'];
        }
        $cfg->class .= ($cfg->class ? ' ' : '').'wrap';
        $cfg->class .= ' '.$this->App::CORE_CONTAINER_SLUG.'-menu-page-area';
        $cfg->class .= ' '.$this->App::CORE_CONTAINER_SLUG.'-menu-page-wrapper';
        $cfg->class .= ' '.$this->App->Config->©brand['©slug'].'-menu-page-wrapper';
        $cfg->class .= $cfg->page !== $this->App->Config->©brand['©slug'] ? ' '.$cfg->page.'-menu-page-wrapper' : '';

        if (!$cfg->icon) {
            $cfg->icon = 'dashicons-admin-generic';
        }
        if (!isset($cfg->position[0])) {
            $cfg->position = null; // No preference.
        }
        $cfg = $this->s::applyFilters('menu_page', $cfg, $args, $default_args);

        if (!$cfg->template_file) {
            throw $this->c::issue('Missing template file.');
        }
        $cfg->nav_tabs = $this->is($cfg->page) ? $this->buildNavTabs($cfg) : '';
        $cfg->callback = $cfg->callback ?: function () use ($cfg) {
            echo $this->c::getTemplate('s-core/admin/menu-pages/template.php')->parse(compact('cfg'));
        };
        $this->hook_names[$cfg->page] = // By slug. See: <https://developer.wordpress.org/reference/functions/add_menu_page/>
            add_menu_page($cfg->page_title, $cfg->menu_title, $cfg->capability, $cfg->page, $cfg->callback, $cfg->icon, $cfg->position);
    }
508352
public function addPage($page = null)
    {
        if ($page = parent::addPage($page)) {
            $page->setParent($this);
        }

        return $page;
    }
450365
public function setCurrentPage($page)
    {
        if ($page > 0 && $page <= $this->getPageCount()) {
            $this->currentpage = $page;
        } else {
            $this->currentpage = 1;
        }

        // $start = ($this->currentpage - 1) * $this->pagesize;
        // $this->setPageRows($start, $this->pagesize);
        //  $this->Reload();
    }
151091
public function setPage($page)
  {
    if ($this->isLocked()) {
      return $this->getObj()->setPage($page)->setLocked();
    } else {
      return parent::setPage($page);
    }
  }
1262910
public function url( array $args = [] ) {
		$url = $this->siteurl;
		if ( $args ) {
			$url = add_query_arg( $args, $url );
		}

		return $url;
	}