<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\Widget; class ButtonLink extends AbstractWidget { public static function getAssets() { return array('style' => ''); } public static function make(...$bY7Wp) { goto tmEHU; Mc0AH: $bMeyO->url($bY7Wp[2]); goto N4FnN; zk2db: $bMeyO->type($bY7Wp[0]); goto hWdBQ; tmEHU: $bMeyO = new static(); goto zk2db; N4FnN: return $bMeyO; goto i58W0; hWdBQ: $bMeyO->text($bY7Wp[1]); goto Mc0AH; i58W0: } public static function __callStatic($glP3G, $bY7Wp) { goto A26Av; W0QPS: throw new \Exception('ButtonAjaxRequest error ' . join(',', $DslRv) . ' '); goto h4foF; A26Av: $DslRv = array('muted', 'warning', 'danger', 'success', 'primary'); goto OwOk5; OwOk5: if (in_array($glP3G, $DslRv)) { goto jrg4A; odAw4: $bMeyO->url($bY7Wp[1]); goto H3l9V; V2Vjv: return $bMeyO; goto B5kia; jrg4A: $bMeyO = new static(); goto NvEz0; H3l9V: $bMeyO->disabled(empty($bY7Wp[2]) ? false : true); goto V2Vjv; pPUos: $bMeyO->text($bY7Wp[0]); goto odAw4; NvEz0: $bMeyO->type($glP3G); goto pPUos; B5kia: } goto W0QPS; h4foF: } public function render() { if ($this->disabled) { return '<a href="javascript:;" ' . ($this->blank ? 'target="_blank"' : '') . ' class="btn btn-' . $this->type . '" ' . $this->attr . '>' . $this->text . '</a>'; } else { return '<a href="' . $this->url . '" ' . ($this->blank ? 'target="_blank"' : '') . ' class="btn btn-' . $this->type . '" ' . $this->attr . '>' . $this->text . '</a>'; } } }