<?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($L4owo, $nvZ9A) { goto bXhxe; bXhxe: $Ai6oc = array('muted', 'warning', 'danger', 'success', 'primary'); goto M9CBn; ciFBj: throw new \Exception('TextDialogRequest error ' . join(',', $Ai6oc) . ' '); goto PL6JB; M9CBn: if (in_array($L4owo, $Ai6oc)) { goto kAzTx; klMYg: $fNHhl->type($L4owo); goto XeIh9; ij16Y: return $fNHhl->render(); goto KLXmA; XeIh9: $fNHhl->text($nvZ9A[0]); goto nHRJP; ZzcqX: if (isset($nvZ9A[2])) { $fNHhl->disabled($nvZ9A[2]); } goto ij16Y; nHRJP: $fNHhl->url($nvZ9A[1]); goto ZzcqX; kAzTx: $fNHhl = new static(); goto klMYg; KLXmA: } goto ciFBj; PL6JB: } public static function make(...$nvZ9A) { goto T58m2; NYhDD: $fNHhl->url($nvZ9A[2]); goto BP0DA; ChEvn: $fNHhl->text($nvZ9A[1]); goto NYhDD; BP0DA: return $fNHhl; goto JWEIY; T58m2: $fNHhl = new static(); goto UoYg0; UoYg0: $fNHhl->type($nvZ9A[0]); goto ChEvn; JWEIY: } public function size($yNOaD = 'big') { switch ($yNOaD) { case 'big': return $this->attr(($this->attr ? $this->attr : '') . ' data-dialog-width="90%" data-dialog-height="90%"'); } return $this; } public function render() { goto RhXe7; RQGeZ: if ($this->disabled) { return '<a href="javascript:;" class="ub-text-dialog-request ub-text-' . $FDNZs . '">' . $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-' . $FDNZs . '">' . $this->text . '</a>'; } goto HeaRO; G5vTP: if ('primary' == $FDNZs) { $FDNZs = 'link'; } goto RQGeZ; RhXe7: $FDNZs = $this->type; goto G5vTP; HeaRO: } }