ValidatorsCommands
final class ValidatorsCommands (View source)
Constants
VALIDATE_ENTITY_LOAD |
|
Methods
Validate that passed entity names are valid.
Validate that passed module names are enabled. We use post-init phase because interact() methods run early and they need to know that their module is enabled (e.g. image-flush).
Validate that the file path exists.
Validate that required PHP extension exists.
Validate that the permission exists.
Details
validateEntityLoad(CommandData $commandData)
Validate that passed entity names are valid.
void
validateModuleEnabled(Input $input, AnnotationData $annotationData)
Validate that passed module names are enabled. We use post-init phase because interact() methods run early and they need to know that their module is enabled (e.g. image-flush).
validateFileExists(CommandData $commandData)
Validate that the file path exists.
Annotation value should be the name of the argument containing the path.
validatePHPExtension(CommandData $commandData)
Validate that required PHP extension exists.
Annotation value should be extension name. If multiple, delimit by a comma.
validatePermissions(CommandData $commandData)
Validate that the permission exists.
Annotation value should be the name of the argument/option containing the permission(s).