<?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($c6VKG, $lLyBI) { goto eNodv; MgMHU: if (in_array($c6VKG, $YoRvD)) { goto gehPs; dxnvS: return $SKGnU->render(); goto dlpFg; zPydk: $SKGnU->url($lLyBI[1]); goto gbiR0; rbE33: $SKGnU->text($lLyBI[0]); goto zPydk; Cy81N: $SKGnU->type($c6VKG); goto rbE33; gbiR0: if (isset($lLyBI[2])) { $SKGnU->disabled($lLyBI[2]); } goto dxnvS; gehPs: $SKGnU = new static(); goto Cy81N; dlpFg: } goto Nxe1N; Nxe1N: throw new \Exception('TextDialogRequest error ' . join(',', $YoRvD) . ' '); goto KQhPt; eNodv: $YoRvD = array('muted', 'warning', 'danger', 'success', 'primary'); goto MgMHU; KQhPt: } public static function make(...$lLyBI) { goto lrYiY; EsXaC: $SKGnU->text($lLyBI[1]); goto JsInI; lrYiY: $SKGnU = new static(); goto x3AI_; JQTmU: return $SKGnU; goto K8g6o; JsInI: $SKGnU->url($lLyBI[2]); goto JQTmU; x3AI_: $SKGnU->type($lLyBI[0]); goto EsXaC; K8g6o: } public function size($xR91w = 'big') { switch ($xR91w) { case 'big': return $this->attr(($this->attr ? $this->attr : '') . ' data-dialog-width="90%" data-dialog-height="90%"'); } return $this; } public function render() { goto RCB9a; yvIGt: if ($this->disabled) { return '<a href="javascript:;" class="ub-text-dialog-request ub-text-' . $F28aA . '">' . $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-' . $F28aA . '">' . $this->text . '</a>'; } goto VrdOH; RCB9a: $F28aA = $this->type; goto NnIu8; NnIu8: if ('primary' == $F28aA) { $F28aA = 'link'; } goto yvIGt; VrdOH: } }