<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\Widget; use ModStart\ModStart; class ButtonAjaxRequest extends AbstractWidget { public static function getAssets() { return array('style' => '.ub-button-ajax-request{display:inline-block;}'); } public static function __callStatic($ZZMEd, $rxS2C) { goto XwEBX; u7aF8: throw new \Exception('ButtonAjaxRequest error ' . join(',', $Rmgm_) . ' '); goto Mktbj; XwEBX: $Rmgm_ = array('muted', 'warning', 'danger', 'success', 'primary'); goto HlJyL; HlJyL: if (in_array($ZZMEd, $Rmgm_)) { goto h4ROS; td6lB: $ZceHo->text($rxS2C[0]); goto f1j7i; xJzoQ: $ZceHo->confirm(empty($rxS2C[2]) ? '' : $rxS2C[2]); goto U3Nbd; f1j7i: $ZceHo->url($rxS2C[1]); goto xJzoQ; U3Nbd: $ZceHo->disabled(empty($rxS2C[3]) ? false : true); goto ZPLf_; wptx_: $ZceHo->type($ZZMEd); goto td6lB; h4ROS: $ZceHo = new static(); goto wptx_; ZPLf_: return $ZceHo->render(); goto e3vIj; e3vIj: } goto u7aF8; Mktbj: } public function render() { if ($this->disabled) { return '<a href="javascript:;" class="btn ub-button-ajax-request btn-' . $this->type . '">' . $this->text . '</a>'; } else { return '<a href="javascript:;" ' . ($this->confirm ? 'data-confirm="' . $this->confirm . '"' : '') . ' data-ajax-request-loading data-ajax-request="' . $this->url . '" class="btn ub-button-ajax-request btn-' . $this->type . '">' . $this->text . '</a>'; } } }