<?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($L1g9F, $CUZy6) { goto C2TXO; C2TXO: $GdddG = array('primary', 'muted', 'warning', 'danger', 'success'); goto p5yfC; p5yfC: if (in_array($L1g9F, $GdddG)) { goto tXbla; X8848: $o5T8w->text($CUZy6[0]); goto Dd0cm; ai50f: return $o5T8w->render(); goto EGsDD; tXbla: $o5T8w = new static(); goto X3d0d; X3d0d: $o5T8w->type($L1g9F); goto X8848; Dd0cm: $o5T8w->attr(empty($CUZy6[1]) ? '' : $CUZy6[1]); goto ai50f; EGsDD: } goto gB7GJ; gB7GJ: throw new \Exception('TextAction error ' . join(',', $GdddG) . ' '); goto uP4Em; uP4Em: } 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>'; } } }