trait for symlinking / copying plugin assets to app's webroot.
Copy directory
Create directory
Create symlink
Get list of plugins to process. Plugins without a webroot directory are skipped.
Process plugins
Remove folder/symlink.
_copyDirectory(string $source, string $destination): bool
Copy directory
string $source Source directory
string $destination Destination directory
bool_createDirectory(string $dir): bool
Create directory
string $dir Directory name
bool_createSymlink(string $target, string $link): bool
Create symlink
string $target Target directory
string $link Link name
bool_list(string|null $name = null): array<string, mixed>
Get list of plugins to process. Plugins without a webroot directory are skipped.
string|null $name optional Name of plugin for which to symlink assets. If null all plugins will be processed.
array<string, mixed>_process(array<string, mixed> $plugins, bool $copy = false, bool $overwrite = false): void
Process plugins
array<string, mixed> $plugins List of plugins to process
bool $copy optional Force copy mode. Default false.
bool $overwrite optional Overwrite existing files.
void_remove(array<string, mixed> $config): bool
Remove folder/symlink.
array<string, mixed> $config Plugin config.
boolArguments
Cake\Console\ArgumentsConsole IO
Cake\Console\ConsoleIo
© 2005–present The Cake Software Foundation, Inc.
Licensed under the MIT License.
CakePHP is a registered trademark of Cake Software Foundation, Inc.
We are not endorsed by or affiliated with CakePHP.
https://api.cakephp.org/4.4/trait-Cake.Command.PluginAssetsTrait.html