<?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($c6VKG, $lLyBI) { goto IIix6; Si5rb: throw new \Exception('ButtonDialogRequest error ' . join(',', $YoRvD) . ' '); goto I45Un; IIix6: $YoRvD = array('muted', 'warning', 'danger', 'success', 'primary'); goto QFyCw; QFyCw: if (in_array($c6VKG, $YoRvD)) { goto aOMkF; Xu9L3: return $SKGnU->render(); goto csTLj; Nj3wK: $SKGnU->url($lLyBI[1]); goto XGpnR; k5rvn: $SKGnU->type($c6VKG); goto AEw7C; XGpnR: $SKGnU->disabled(empty($lLyBI[2]) ? false : true); goto Xu9L3; AEw7C: $SKGnU->text($lLyBI[0]); goto Nj3wK; aOMkF: $SKGnU = new static(); goto k5rvn; csTLj: } goto Si5rb; I45Un: } public static function make(...$lLyBI) { goto Oe7jS; W5U3Q: return $SKGnU; goto oecs2; zYM5p: $SKGnU->text($lLyBI[1]); goto aNbr5; Oe7jS: $SKGnU = new static(); goto Wm2wp; Wm2wp: $SKGnU->type($lLyBI[0]); goto zYM5p; aNbr5: $SKGnU->url($lLyBI[2]); goto W5U3Q; oecs2: } public function size($xR91w = 'big') { switch ($xR91w) { 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>'; } } }