<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\Widget; class ButtonLink extends AbstractWidget { public static function getAssets() { return array('style' => ''); } public static function __callStatic($L4owo, $nvZ9A) { goto Fcfln; z_tCk: if (in_array($L4owo, $Ai6oc)) { goto uQtcU; L1av1: return $fNHhl; goto cogx7; gIrM0: $fNHhl->text($nvZ9A[0]); goto R1iNG; R1iNG: $fNHhl->url($nvZ9A[1]); goto rfBMs; uQtcU: $fNHhl = new static(); goto lJmaH; lJmaH: $fNHhl->type($L4owo); goto gIrM0; rfBMs: $fNHhl->disabled(empty($nvZ9A[2]) ? false : true); goto L1av1; cogx7: } goto Je4Sy; Fcfln: $Ai6oc = array('muted', 'warning', 'danger', 'success', 'primary'); goto z_tCk; Je4Sy: throw new \Exception('ButtonAjaxRequest error ' . join(',', $Ai6oc) . ' '); goto w0g1n; w0g1n: } 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>'; } } }