<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\Widget; class ButtonLink extends AbstractWidget { public static function getAssets() { return array('style' => ''); } public static function __callStatic($rPkIY, $HPXJC) { goto rtwi5; rtwi5: $XVuOQ = array('muted', 'warning', 'danger', 'success', 'primary'); goto iS1QT; Pi2Dp: throw new \Exception('ButtonAjaxRequest error ' . join(',', $XVuOQ) . ' '); goto Woi3Z; iS1QT: if (in_array($rPkIY, $XVuOQ)) { goto XKpAh; C5RPN: $WwLCq->type($rPkIY); goto I7EL3; XKpAh: $WwLCq = new static(); goto C5RPN; DugLd: $WwLCq->disabled(empty($HPXJC[2]) ? false : true); goto Xqb9j; I7EL3: $WwLCq->text($HPXJC[0]); goto lZ2MC; lZ2MC: $WwLCq->url($HPXJC[1]); goto DugLd; Xqb9j: return $WwLCq; goto FAync; FAync: } goto Pi2Dp; Woi3Z: } public function render() { if ($this->disabled) { return '<a href="javascript:;" ' . ($this->blank ? 'target="_blank"' : '') . ' class="btn btn-' . $this->type . '">' . $this->text . '</a>'; } else { return '<a href="' . $this->url . '" ' . ($this->blank ? 'target="_blank"' : '') . ' class="btn btn-' . $this->type . '">' . $this->text . '</a>'; } } }