<?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($ZZMEd, $rxS2C) { goto s1zuC; s1zuC: $Rmgm_ = array('muted', 'warning', 'danger', 'success', 'primary'); goto U2K09; U2K09: if (in_array($ZZMEd, $Rmgm_)) { goto rXiUF; LUhrL: $ZceHo->url($rxS2C[1]); goto Q8P8L; Ve3Qu: $ZceHo->text($rxS2C[0]); goto LUhrL; Q8P8L: $ZceHo->disabled(empty($rxS2C[2]) ? false : true); goto HCQL1; HCQL1: return $ZceHo->render(); goto xpJXh; ZvrcE: $ZceHo->type($ZZMEd); goto Ve3Qu; rXiUF: $ZceHo = new static(); goto ZvrcE; xpJXh: } goto bGV1e; bGV1e: throw new \Exception('ButtonDialogRequest error ' . join(',', $Rmgm_) . ' '); goto J7olv; J7olv: } public static function make(...$rxS2C) { goto LBKkc; reBgT: $ZceHo->type($rxS2C[0]); goto pgspo; XXw1A: return $ZceHo; goto PpnQv; pgspo: $ZceHo->text($rxS2C[1]); goto ckNSE; ckNSE: $ZceHo->url($rxS2C[2]); goto XXw1A; LBKkc: $ZceHo = new static(); goto reBgT; PpnQv: } public function size($DlhlZ = 'big') { switch ($DlhlZ) { 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>'; } } }