<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\Widget; class ButtonDialogRequest extends AbstractWidget { public static function getAssets() { return array('style' => '.ub-button-dialog-request{display:inline-block;}'); } public static function __callStatic($L1g9F, $CUZy6) { goto n28Xn; pfZzp: throw new \Exception('ButtonDialogRequest error ' . join(',', $GdddG) . ' '); goto s4f0L; Wliyu: if (in_array($L1g9F, $GdddG)) { goto GSJj_; PDIU6: return $o5T8w->render(); goto VoYsP; GSJj_: $o5T8w = new static(); goto jQd5e; mc6JV: $o5T8w->disabled(empty($CUZy6[2]) ? false : true); goto PDIU6; kPCba: $o5T8w->url($CUZy6[1]); goto mc6JV; NuMWP: $o5T8w->text($CUZy6[0]); goto kPCba; jQd5e: $o5T8w->type($L1g9F); goto NuMWP; VoYsP: } goto pfZzp; n28Xn: $GdddG = array('muted', 'warning', 'danger', 'success', 'primary'); goto Wliyu; s4f0L: } public static function make(...$CUZy6) { goto hxgMT; hxgMT: $o5T8w = new static(); goto upUwR; YrHRI: $o5T8w->url($CUZy6[2]); goto rKJVR; upUwR: $o5T8w->type($CUZy6[0]); goto UUkgG; rKJVR: return $o5T8w; goto BekGO; UUkgG: $o5T8w->text($CUZy6[1]); goto YrHRI; BekGO: } public function size($VRgM7 = 'big') { switch ($VRgM7) { case 'big': return $this->attr(($this->attr ? $this->attr : '') . ' data-dialog-width="90%" data-dialog-height="90%"'); } return $this; } public function render() { if ($this->disabled) { return '<a href="javascript:;" class="btn ub-button-dialog-request btn-' . $this->type . '">' . $this->text . '</a>'; } else { return '<a href="javascript:;" ' . ($this->confirm ? 'data-confirm="' . $this->confirm . '"' : '') . ' data-dialog-request="' . $this->url . '" class="btn ub-button-dialog-request btn-' . $this->type . '" ' . ($this->attr ? $this->attr : '') . '>' . $this->text . '</a>'; } } }