/** * (non-PHPdoc) * @see \Thrace\DataGridBundle\DataGrid\DataGridInterface::addCustomButton() */ public function addCustomButton(CustomButton $customButton) { $this->customButtons[$customButton->getName()] = $customButton; return $this; }
public function addCustomButton(CustomButton $customButton) { if ($this->hasCustomButton($customButton->getName())) { throw new \InvalidArgumentException(sprintf('CustomButton: "%s" already exists in the stack', $customButton->getName())); } $this->customButtons[$customButton->getName()] = $customButton; return $this; }