<?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($f0dxO, $RSGSj) { goto BVPvB; k19MZ: if (in_array($f0dxO, $eElQG)) { goto YUbkS; Xs1bn: $BoHUj->text($RSGSj[0]); goto IV14x; YUbkS: $BoHUj = new static(); goto GvTdG; IV14x: $BoHUj->url($RSGSj[1]); goto R5Qes; R5Qes: if (isset($RSGSj[2])) { $BoHUj->disabled($RSGSj[2]); } goto hZ3H0; hZ3H0: return $BoHUj->render(); goto d41hk; GvTdG: $BoHUj->type($f0dxO); goto Xs1bn; d41hk: } goto y4UZH; BVPvB: $eElQG = array('muted', 'warning', 'danger', 'success', 'primary'); goto k19MZ; y4UZH: throw new \Exception('TextDialogRequest error ' . join(',', $eElQG) . ' '); goto u03tz; u03tz: } public static function make(...$RSGSj) { goto qBn00; FO4QH: $BoHUj->url($RSGSj[2]); goto XeTbK; qBn00: $BoHUj = new static(); goto R5jXw; G0xjn: $BoHUj->text($RSGSj[1]); goto FO4QH; R5jXw: $BoHUj->type($RSGSj[0]); goto G0xjn; XeTbK: return $BoHUj; goto mK0z0; mK0z0: } public function size($IiMdC = 'big') { switch ($IiMdC) { case 'big': return $this->attr(($this->attr ? $this->attr : '') . ' data-dialog-width="90%" data-dialog-height="90%"'); } return $this; } public function render() { goto mhJE1; kcroz: if ($this->disabled) { return '<a href="javascript:;" class="ub-text-dialog-request ub-text-' . $E1HRj . '">' . $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-' . $E1HRj . '">' . $this->text . '</a>'; } goto lzq3o; HUvHa: if ('primary' == $E1HRj) { $E1HRj = 'link'; } goto kcroz; mhJE1: $E1HRj = $this->type; goto HUvHa; lzq3o: } }