protected function addSelectCommand(Contao2BackendViewDefinitionInterface $view, $container)
{
/** @var BasicDefinitionInterface $definition */
$definition = $container->getBasicDefinition();
// No ations allowed. Don't add the select command button.
if (!$definition->isEditable() && !$definition->isDeletable() && !$definition->isCreatable()) {
return;
}
$commands = $view->getGlobalCommands();
$command = new SelectCommand();
$command->setName('all')->setLabel('MSC.all.0')->setDescription('MSC.all.1');
$parameters = $command->getParameters();
$parameters['act'] = 'select';
$extra = $command->getExtra();
$extra['class'] = 'header_edit_all';
$commands->addCommand($command);
}