for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Encore\Admin\Grid\Tools;
use Encore\Admin\Grid;
use Illuminate\Contracts\Support\Renderable;
abstract class AbstractTool implements Renderable
{
/**
* @var Grid
*/
protected $grid;
* @var bool
protected $disabled = false;
* Toggle this button.
*
* @param bool $disable
* @return $this
public function disable(bool $disable = true)
$this->disabled = $disable;
return $this;
}
* If the tool is allowed.
public function allowed()
return !$this->disabled;
* Set parent grid.
* @param Grid $grid
public function setGrid(Grid $grid)
$this->grid = $grid;
* {@inheritdoc}
abstract public function render();
* @return string
public function __toString()
return $this->render();