SilverStripe IDE Annotations

AnnotatePermissionChecker
in package

Class AnnotatePermissionChecker

Helperclass to check if the current environment, class or module is allowed to be annotated. This is abstracted from @see DataObjectAnnotator to separate and clean up.

Table of Contents

Properties

$supportedParentClasses  : mixed
In the future we will support other Classes as well.

Methods

classNameIsAllowed()  : bool
Check if a DataObject or DataExtension subclass is allowed by checking if the file is in the $allowed_modules array The permission is checked by matching the filePath and modulePath
classNameIsSupported()  : bool
Check if a (subclass of ) class is a supported
enabledModules()  : array<string|int, mixed>
environmentIsAllowed()  : bool
getSupportedParentClasses()  : array<string|int, mixed>
isEnabled()  : bool
moduleIsAllowed()  : bool
Check if a module is in the $allowed_modules array Required for the buildTask.

Properties

$supportedParentClasses

In the future we will support other Classes as well.

protected mixed $supportedParentClasses = [\SilverStripe\ORM\DataObject::class, \SilverStripe\ORM\DataExtension::class, \SilverStripe\Control\Controller::class, \SilverStripe\Core\Extension::class]

We list the core classes, but in fact only it's subclasses are supported

Tags
see

AnnotatePermissionChecker::classNameIsSupported();

Methods

classNameIsAllowed()

Check if a DataObject or DataExtension subclass is allowed by checking if the file is in the $allowed_modules array The permission is checked by matching the filePath and modulePath

public classNameIsAllowed( $className) : bool
Parameters
$className :
Tags
throws
NotFoundExceptionInterface
throws
ReflectionException
Return values
bool

classNameIsSupported()

Check if a (subclass of ) class is a supported

public classNameIsSupported( $className) : bool
Parameters
$className :
Return values
bool

getSupportedParentClasses()

public getSupportedParentClasses() : array<string|int, mixed>
Return values
array<string|int, mixed>

moduleIsAllowed()

Check if a module is in the $allowed_modules array Required for the buildTask.

public moduleIsAllowed(string $moduleName) : bool
Parameters
$moduleName : string
Return values
bool

        
On this page

Search results