<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\Widget; use ModStart\ModStart; class TextLink extends AbstractWidget { public static function getAssets() { return array('style' => '.ub-text-link{display:inline-block;margin-right:0.5rem;}'); } public static function make(...$lLyBI) { goto Wi0Bf; x89jS: $SKGnU->type($lLyBI[0]); goto PBA5K; Wi0Bf: $SKGnU = new static(); goto x89jS; PBA5K: $SKGnU->text($lLyBI[1]); goto Sl6F8; qbgC0: return $SKGnU; goto W7e7T; Sl6F8: $SKGnU->link($lLyBI[2]); goto qbgC0; W7e7T: } public static function __callStatic($c6VKG, $lLyBI) { goto osx2V; siKs8: throw new \Exception('TextLink error ' . join(',', $YoRvD) . ' '); goto YrU8O; osx2V: $YoRvD = array('primary', 'muted', 'warning', 'danger', 'success'); goto PXpX_; PXpX_: if (in_array($c6VKG, $YoRvD)) { goto XrcMi; XrcMi: $SKGnU = new static(); goto mf0tG; lJNFi: $SKGnU->link($lLyBI[1]); goto BrD0X; mf0tG: $SKGnU->type($c6VKG); goto hd7RQ; hd7RQ: $SKGnU->text($lLyBI[0]); goto lJNFi; BrD0X: $SKGnU->attr(empty($lLyBI[2]) ? '' : $lLyBI[2]); goto fQYtb; fQYtb: return $SKGnU->render(); goto TATK5; TATK5: } goto siKs8; YrU8O: } public function render() { if ($this->disabled) { return '<a href="javascript:;" class="ub-text-link ub-text-muted">' . $this->text . '</a>'; } else { return '<a href="' . $this->link . '" class="ub-text-link ub-text-' . ($this->type == 'primary' ? 'link' : $this->type) . '" ' . $this->attr . '>' . $this->text . '</a>'; } } }