<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\Widget; use ModStart\ModStart; class TextDialogRequest extends AbstractWidget { public static function getAssets() { return array('style' => '.ub-text-dialog-request{display:inline-block;margin-right:0.5rem;}'); } public static function __callStatic($sQIr6, $g59Hh) { goto DkIz6; OLpxt: if (in_array($sQIr6, $KDM3X)) { goto jHWFg; jHWFg: $qRCHN = new static(); goto G19gp; G19gp: $qRCHN->type($sQIr6); goto IIjdJ; jL9y9: return $qRCHN->render(); goto f8lQH; T053y: $qRCHN->url($g59Hh[1]); goto JOVjD; IIjdJ: $qRCHN->text($g59Hh[0]); goto T053y; JOVjD: if (isset($g59Hh[2])) { $qRCHN->disabled($g59Hh[2]); } goto jL9y9; f8lQH: } goto XzP0C; XzP0C: throw new \Exception('TextDialogRequest error ' . join(',', $KDM3X) . ' '); goto IUVpJ; DkIz6: $KDM3X = array('muted', 'warning', 'danger', 'success', 'primary'); goto OLpxt; IUVpJ: } public static function make(...$g59Hh) { goto qep0c; K8FfB: return $qRCHN; goto PMLsj; qep0c: $qRCHN = new static(); goto G3Ub9; iuIYC: $qRCHN->url($g59Hh[2]); goto K8FfB; G3Ub9: $qRCHN->type($g59Hh[0]); goto Q3BeR; Q3BeR: $qRCHN->text($g59Hh[1]); goto iuIYC; PMLsj: } 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() { goto lLPoK; lLPoK: $aHcWY = $this->type; goto krmId; jOICe: if ($this->disabled) { return '<a href="javascript:;" class="ub-text-dialog-request ub-text-' . $aHcWY . '">' . $this->text . '</a>'; } else { return '<a href="javascript:;" ' . ($this->confirm ? 'data-confirm="' . $this->confirm . '"' : '') . ' ' . ($this->width ? 'data-dialog-width="' . $this->width . '"' : '') . ' ' . ($this->height ? 'data-dialog-height="' . $this->height . '"' : '') . ' ' . ($this->attr ? $this->attr : '') . ' data-dialog-request="' . $this->url . '" class="ub-text-dialog-request ub-text-' . $aHcWY . '">' . $this->text . '</a>'; } goto oW775; krmId: if ('primary' == $aHcWY) { $aHcWY = 'link'; } goto jOICe; oW775: } }