芝麻web文件管理V1.00
编辑当前文件:/home2/sdektunc/airport-back/vendor/yiisoft/yii2-debug/src/widgets/NavigationButton.php
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], ]; } }