<?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($TUuqF, $MVaFK) { goto mcTm1; s50k4: throw new \Exception('TextAction error ' . join(',', $U0Xav) . ' '); goto l1SIN; ra7SP: if (in_array($TUuqF, $U0Xav)) { goto fUgCl; e13Jc: $xU_gb->type($TUuqF); goto E7grs; K4mXY: return $xU_gb->render(); goto pdkFL; AuQzn: $xU_gb->attr(empty($MVaFK[1]) ? '' : $MVaFK[1]); goto K4mXY; E7grs: $xU_gb->text($MVaFK[0]); goto AuQzn; fUgCl: $xU_gb = new static(); goto e13Jc; pdkFL: } goto s50k4; mcTm1: $U0Xav = array('primary', 'muted', 'warning', 'danger', 'success'); goto ra7SP; l1SIN: } 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 . '" ' . $this->attr . '>' . $this->text . '</span>'; } } }