<?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($TUuqF, $MVaFK) { goto QdrYT; r7Lyd: if (in_array($TUuqF, $U0Xav)) { goto AJ6cr; kkAFr: return $xU_gb->render(); goto w32fy; O03lm: $xU_gb->type($TUuqF); goto IEDOJ; PtBns: $xU_gb->url($MVaFK[1]); goto kkAFr; AJ6cr: $xU_gb = new static(); goto O03lm; IEDOJ: $xU_gb->text($MVaFK[0]); goto PtBns; w32fy: } goto Nhy6K; QdrYT: $U0Xav = array('muted', 'warning', 'danger', 'success', 'primary'); goto r7Lyd; Nhy6K: throw new \Exception('TextDialogRequest error ' . join(',', $U0Xav) . ' '); goto gpD6R; gpD6R: } public function render() { if ($this->disabled) { return '<a href="javascript:;" class="ub-text-dialog-request ub-text-' . $this->type . '">' . $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 . '"' : '') . ' data-dialog-request="' . $this->url . '" class="ub-text-dialog-request ub-text-' . $this->type . '">' . $this->text . '</a>'; } } }