content = $content; } /** * @param string $content 按钮内容 * @return $this */ public static function make($content = null) { return new Button($content); } /** * @param mixed $uri * @return $this */ public function uri($uri) { $this->uri = $uri; return $this; } /** * @param string $handler 响应类型 request|route|link * @return $this */ public function handler($handler) { if (!in_array($handler, [self::HANDLER_LINK, self::HANDLER_REQUEST, self::HANDLER_ROUTE])) { throw new BusinessException(400, "ActionButton 事件类型错误"); } $this->handler = $handler; return $this; } public function route($uri) { $this->uri = $uri; $this->handler = self::HANDLER_ROUTE; return $this; } public function addSubItem(SubForm $formItems) { $this->subFormEmit = $formItems->getSubFormEmit(); $this->subForm = $formItems->getFormItems(); return $this; } }