<?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($sQIr6, $g59Hh) { goto tZbh5; tZbh5: $KDM3X = array('muted', 'warning', 'danger', 'success', 'primary'); goto gJlD1; gxgg0: throw new \Exception('ButtonDialogRequest error ' . join(',', $KDM3X) . ' '); goto Y6LnH; gJlD1: if (in_array($sQIr6, $KDM3X)) { goto ZopHu; k3TBa: $qRCHN->type($sQIr6); goto Nw_VQ; BJGUg: $qRCHN->url($g59Hh[1]); goto Z_8bw; Nw_VQ: $qRCHN->text($g59Hh[0]); goto BJGUg; ZopHu: $qRCHN = new static(); goto k3TBa; Z_8bw: $qRCHN->disabled(empty($g59Hh[2]) ? false : true); goto ahhsv; ahhsv: return $qRCHN->render(); goto UPIHl; UPIHl: } goto gxgg0; Y6LnH: } public static function make(...$g59Hh) { goto LCR6F; E_oFB: $qRCHN->type($g59Hh[0]); goto nmHxr; qzDx2: $qRCHN->url($g59Hh[2]); goto fnTuU; fnTuU: return $qRCHN; goto XrPBs; LCR6F: $qRCHN = new static(); goto E_oFB; nmHxr: $qRCHN->text($g59Hh[1]); goto qzDx2; XrPBs: } public function size($NVUsK = 'big') { switch ($NVUsK) { 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>'; } } }