<?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($sQIr6, $g59Hh) { goto OaDtz; OaDtz: $KDM3X = array('primary', 'muted', 'warning', 'danger', 'success'); goto ilOTC; Re1Nv: throw new \Exception('TextAction error ' . join(',', $KDM3X) . ' '); goto ydwvy; ilOTC: if (in_array($sQIr6, $KDM3X)) { goto vtnAD; fdqyQ: return $qRCHN->render(); goto Rq1Xv; REZ3C: $qRCHN->type($sQIr6); goto vmoN0; vmoN0: $qRCHN->text($g59Hh[0]); goto lyECO; lyECO: $qRCHN->attr(empty($g59Hh[1]) ? '' : $g59Hh[1]); goto fdqyQ; vtnAD: $qRCHN = new static(); goto REZ3C; Rq1Xv: } goto Re1Nv; ydwvy: } 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>'; } } }