public false|\Joomla\CMS\Toolbar\ToolbarButton
loadButtonType
(mixed $type, mixed $new = false)
/**
* Loads a button type.
*
* @param string $type Button Type
* @param boolean $new False by default
*
* @return false|ToolbarButton
*
* @since 1.5
*/
public function loadButtonType($type, $new = false)
{
// For B/C, catch the exceptions thrown by the factory
try {
return $this->factory->createButton($this, $type);
} catch (\InvalidArgumentException $e) {
Log::add($e->getMessage(), Log::WARNING, 'jerror');
return false;
}
}