plugin_dto
class plugin_dto extends abstract_dto implements Stringable
| internal |
Data Transfer Object representing a Moodle plugin.
Abstracts the core plugininfo structure into a serializable, immutable representation for domain/services without leaking Moodle internals.
Methods
Default implementation to serialize to JSON using the array representation.
No description
String representation (component name).
Convert to associative array with key metadata.
Returns true if the plugin exists on disk.
Returns true if the plugin is installed (has DB version or folder).
Returns true if the plugin requires a core version.
Details
in
abstract_dto at line 38
array
jsonSerialize()
Default implementation to serialize to JSON using the array representation.
at line 51
__construct(string $type, string $name, string $component, string|null $rootdir, string|null $displayname, string|null $source, int|string|null $versiondisk, int|string|null $versiondb, float|int|string|null $versionrequires, array|null $dependencies, bool|null $enabled, string|null $release, array|null $supported, int|null $incompatible, string|null $status)
No description
at line 72
string
__toString()
String representation (component name).
at line 82
array
to_array()
Convert to associative array with key metadata.
at line 97
stdClass
to_object()
Convert to stdClass for compatibility layers.
at line 110
bool
exists_on_disk()
Returns true if the plugin exists on disk.
at line 118
bool
is_installed()
Returns true if the plugin is installed (has DB version or folder).
at line 126
bool
has_core_requirement()
Returns true if the plugin requires a core version.