<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\Widget; use ModStart\ModStart; class TextAction extends AbstractWidget { public static function getAssets() { return array('style' => '.ub-text-action{display:inline-block;margin-right:0.5rem;}'); } public static function __callStatic($XggBq, $lUGZC) { goto bFvO6; ZOSvm: throw new \Exception('TextAction error ' . join(',', $T9vBG) . ' '); goto tOLOS; bFvO6: $T9vBG = array('primary', 'muted', 'warning', 'danger', 'success'); goto dHFT4; dHFT4: if (in_array($XggBq, $T9vBG)) { goto Qs164; v4JUi: $IEFeS->text($lUGZC[0]); goto JfG4k; Qs164: $IEFeS = new static(); goto uaFyd; JfG4k: $IEFeS->attr(empty($lUGZC[1]) ? '' : $lUGZC[1]); goto sHTHk; sHTHk: return $IEFeS->render(); goto pHRaW; uaFyd: $IEFeS->type($XggBq); goto v4JUi; pHRaW: } goto ZOSvm; tOLOS: } public function render() { if ($this->disabled) { return '<a href="javascript:;" class="ub-text-action ub-text-muted">' . $this->text . '</span>'; } else { return '<a href="javascript:;" class="ub-text-action ub-text-' . ($this->type == 'primary' ? '' : $this->type) . '" ' . $this->attr . '>' . $this->text . '</span>'; } } }