<?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($glP3G, $bY7Wp) { goto HlTgL; BQnvM: throw new \Exception('ButtonDialogRequest error ' . join(',', $DslRv) . ' '); goto Q3Li5; Wbgyi: if (in_array($glP3G, $DslRv)) { goto kp0Pn; Ns7Y4: $bMeyO->disabled(empty($bY7Wp[2]) ? false : true); goto R4yxY; kp0Pn: $bMeyO = new static(); goto nMYM3; vNIG6: $bMeyO->text($bY7Wp[0]); goto bLgfH; nMYM3: $bMeyO->type($glP3G); goto vNIG6; R4yxY: return $bMeyO->render(); goto C6Vf9; bLgfH: $bMeyO->url($bY7Wp[1]); goto Ns7Y4; C6Vf9: } goto BQnvM; HlTgL: $DslRv = array('muted', 'warning', 'danger', 'success', 'primary'); goto Wbgyi; Q3Li5: } public static function make(...$bY7Wp) { goto gruJc; Ns6G5: return $bMeyO; goto q7MwA; cWFqB: $bMeyO->url($bY7Wp[2]); goto Ns6G5; csLyq: $bMeyO->type($bY7Wp[0]); goto boHMD; boHMD: $bMeyO->text($bY7Wp[1]); goto cWFqB; gruJc: $bMeyO = new static(); goto csLyq; q7MwA: } public function size($Klf84 = 'big') { switch ($Klf84) { 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>'; } } }