<?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($f0dxO, $RSGSj) { goto flbXO; flbXO: $eElQG = array('primary', 'muted', 'warning', 'danger', 'success'); goto gDryT; fJy_p: throw new \Exception('TextAction error ' . join(',', $eElQG) . ' '); goto yEJEF; gDryT: if (in_array($f0dxO, $eElQG)) { goto OZt4i; JXVWA: $BoHUj->attr(empty($RSGSj[1]) ? '' : $RSGSj[1]); goto JdWf3; Iavcf: $BoHUj->text($RSGSj[0]); goto JXVWA; HQ6kd: $BoHUj->type($f0dxO); goto Iavcf; JdWf3: return $BoHUj->render(); goto Y955Q; OZt4i: $BoHUj = new static(); goto HQ6kd; Y955Q: } goto fJy_p; yEJEF: } 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>'; } } }