src/Contao/View/Contao2BackendView/ActionHandler/DeleteHandler.php
private function checkPermission(EnvironmentInterface $environment)
    {
        if (true === $environment->getDataDefinition()->getBasicDefinition()->isDeletable()) {
            return true;
        }

        return \sprintf(
            '<div style="text-align:center; font-weight:bold; padding:40px;">
                You have no permission for delete model %s.
            </div>',
            ModelId::fromSerialized($environment->getInputProvider()->getParameter('id'))->getSerialized()
        );
    }
private function checkPermission(EnvironmentInterface $environment)
    {
        if (true === $environment->getDataDefinition()->getBasicDefinition()->isDeletable()) {
            return true;
        }

        return \sprintf(
            '<div style="text-align:center; font-weight:bold; padding:40px;">
                You have no permission for delete model %s.
            </div>',
            ModelId::fromSerialized($environment->getInputProvider()->getParameter('id'))->getSerialized()
        );
    }
private function checkPermission ( EnvironmentInterface $ environment ) { if ( true === $ environment -> getDataDefinition ( ) -> getBasicDefinition ( ) -> isDeletable ( ) ) { return true ; } return \ sprintf ( '<div style="text-align:center; font-weight:bold; padding:40px;">
                You have no permission for delete model %s.
            </div>' , ModelId :: fromSerialized ( $ environment -> getInputProvider ( ) -> getParameter ( 'id' ) ) -> getSerialized ( ) ) ; }
Check permission for delete a model.

@param EnvironmentInterface $environment The environment.

@return string|bool
Check permission for delete a model .