<?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($f0dxO, $RSGSj) { goto A0hu0; zXxUt: throw new \Exception('ButtonDialogRequest error ' . join(',', $eElQG) . ' '); goto AgRzV; ryRr6: if (in_array($f0dxO, $eElQG)) { goto qC8rI; f0VBX: $BoHUj->type($f0dxO); goto OGIm_; ssO8n: return $BoHUj->render(); goto DuGS0; ExMJ3: $BoHUj->disabled(empty($RSGSj[2]) ? false : true); goto ssO8n; wt14b: $BoHUj->url($RSGSj[1]); goto ExMJ3; qC8rI: $BoHUj = new static(); goto f0VBX; OGIm_: $BoHUj->text($RSGSj[0]); goto wt14b; DuGS0: } goto zXxUt; A0hu0: $eElQG = array('muted', 'warning', 'danger', 'success', 'primary'); goto ryRr6; AgRzV: } public static function make(...$RSGSj) { goto ZwJTw; bFZGj: $BoHUj->url($RSGSj[2]); goto aVPs2; aVPs2: return $BoHUj; goto qvQJb; fBOa5: $BoHUj->text($RSGSj[1]); goto bFZGj; ZwJTw: $BoHUj = new static(); goto DMRlx; DMRlx: $BoHUj->type($RSGSj[0]); goto fBOa5; qvQJb: } 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() { 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>'; } } }