<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\Widget; use ModStart\ModStart; class TextDialogRequest extends AbstractWidget { public static function getAssets() { return array('style' => '.ub-text-dialog-request{display:inline-block;margin-right:0.5rem;}'); } public static function __callStatic($XggBq, $lUGZC) { goto tDnwJ; j1QHd: throw new \Exception('TextDialogRequest error ' . join(',', $T9vBG) . ' '); goto Pshs5; tDnwJ: $T9vBG = array('muted', 'warning', 'danger', 'success', 'primary'); goto l2EaS; l2EaS: if (in_array($XggBq, $T9vBG)) { goto LTI28; NGeks: if (isset($lUGZC[2])) { $IEFeS->disabled($lUGZC[2]); } goto LUnrS; pInqt: $IEFeS->type($XggBq); goto sT4tJ; G2QB6: $IEFeS->url($lUGZC[1]); goto NGeks; LTI28: $IEFeS = new static(); goto pInqt; sT4tJ: $IEFeS->text($lUGZC[0]); goto G2QB6; LUnrS: return $IEFeS->render(); goto fBaLW; fBaLW: } goto j1QHd; Pshs5: } public static function make(...$lUGZC) { goto U1uBG; U1uBG: $IEFeS = new static(); goto O1EWd; YGHQ3: $IEFeS->url($lUGZC[2]); goto ffYU0; tOnM8: $IEFeS->text($lUGZC[1]); goto YGHQ3; ffYU0: return $IEFeS; goto Qq3jU; O1EWd: $IEFeS->type($lUGZC[0]); goto tOnM8; Qq3jU: } public function size($TUjAS = 'big') { switch ($TUjAS) { case 'big': return $this->attr(($this->attr ? $this->attr : '') . ' data-dialog-width="90%" data-dialog-height="90%"'); } return $this; } public function render() { goto x0zzy; bFdrs: if ($this->disabled) { return '<a href="javascript:;" class="ub-text-dialog-request ub-text-' . $gJGJ7 . '">' . $this->text . '</a>'; } else { return '<a href="javascript:;" ' . ($this->confirm ? 'data-confirm="' . $this->confirm . '"' : '') . ' ' . ($this->width ? 'data-dialog-width="' . $this->width . '"' : '') . ' ' . ($this->height ? 'data-dialog-height="' . $this->height . '"' : '') . ' ' . ($this->attr ? $this->attr : '') . ' data-dialog-request="' . $this->url . '" class="ub-text-dialog-request ub-text-' . $gJGJ7 . '">' . $this->text . '</a>'; } goto k3oKF; UgG_c: if ('primary' == $gJGJ7) { $gJGJ7 = 'link'; } goto bFdrs; x0zzy: $gJGJ7 = $this->type; goto UgG_c; k3oKF: } }