ModuleHandlerStub
extends ModuleHandler
in package
A stub of Drupal's default ModuleHandler class.
Table of Contents
Methods
- __construct() : mixed
- Constructs a new TypedDataManagerStubFactory.
- stubAddModule() : mixed
- Adds a module to the stub instance module list.
- stubAddProfile() : mixed
- Adds a profile to the stub instance module list.
- stubAdd() : mixed
- Adds a module or profile to the stub instance module list.
Methods
__construct()
Constructs a new TypedDataManagerStubFactory.
public
__construct(mixed $root, array<string|int, mixed>|null $module_list, KeyValueFactoryInterface|null $keyValueFactory, CallableResolver|null $callableResolver, CacheBackendInterface|null $cache) : mixed
Parameters
- $root : mixed
- $module_list : array<string|int, mixed>|null
- $keyValueFactory : KeyValueFactoryInterface|null
- $callableResolver : CallableResolver|null
- $cache : CacheBackendInterface|null
stubAddModule()
Adds a module to the stub instance module list.
public
stubAddModule(string $name, string $path) : mixed
Parameters
- $name : string
-
The name of the module.
- $path : string
-
The path to the module.
stubAddProfile()
Adds a profile to the stub instance module list.
public
stubAddProfile(string $name, string $path) : mixed
Parameters
- $name : string
-
The name of the profile.
- $path : string
-
The path to the profile.
stubAdd()
Adds a module or profile to the stub instance module list.
private
stubAdd(string $type, string $name, string $path) : mixed
Parameters
- $type : string
-
The type of the extension ('module' or 'profile').
- $name : string
-
The name of the extension.
- $path : string
-
The path to the extension.