<?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($c6VKG, $lLyBI) { goto BjYhe; dLIW2: throw new \Exception('TextAction error ' . join(',', $YoRvD) . ' '); goto Mnunj; ikDni: if (in_array($c6VKG, $YoRvD)) { goto RSXE2; RSXE2: $SKGnU = new static(); goto fwiN9; fwiN9: $SKGnU->type($c6VKG); goto UVBvc; UVBvc: $SKGnU->text($lLyBI[0]); goto rEbO1; rEbO1: $SKGnU->attr(empty($lLyBI[1]) ? '' : $lLyBI[1]); goto dKSHz; dKSHz: return $SKGnU->render(); goto WP4Zu; WP4Zu: } goto dLIW2; BjYhe: $YoRvD = array('primary', 'muted', 'warning', 'danger', 'success'); goto ikDni; Mnunj: } 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>'; } } }