tree = $tree; $this->tools = new Collection(); } /** * Prepend a tool. * * @param string|\Closure|AbstractTool|Renderable|Htmlable $tool * * @return $this */ public function add($tool) { if ($tool instanceof AbstractTool) { $tool->setParent($this->tree); } $this->tools->push($tool); return $this; } /** * Render header tools bar. * * @return string */ public function render() { return $this->tools->map([Helper::class, 'render'])->implode(' '); } }