On this page
Trait PluginAssetsTrait
trait for symlinking / copying plugin assets to app's webroot.
Property Summary
Method Summary
_copyDirectory() protected
Copy directory
_createDirectory() protected
Create directory
_createSymlink() protected
Create symlink
_list() protected
Get list of plugins to process. Plugins without a webroot directory are skipped.
_process() protected
Process plugins
_remove() protected
Remove folder/symlink.
Method Detail
_copyDirectory() protected
_copyDirectory(string $source, string $destination): bool
Copy directory
Parameters
string$source-
Source directory
string$destination-
Destination directory
Returns
bool_createDirectory() protected
_createDirectory(string $dir): bool
Create directory
Parameters
string$dir-
Directory name
Returns
bool_createSymlink() protected
_createSymlink(string $target, string $link): bool
Create symlink
Parameters
string$target-
Target directory
string$link-
Link name
Returns
bool_list() protected
_list(string|null $name = null): array<string, mixed>
Get list of plugins to process. Plugins without a webroot directory are skipped.
Parameters
string|null$name optional-
Name of plugin for which to symlink assets. If null all plugins will be processed.
Returns
array<string, mixed>_process() protected
_process(array<string, mixed> $plugins, bool $copy = false, bool $overwrite = false): void
Process plugins
Parameters
array<string, mixed>$plugins-
List of plugins to process
bool$copy optional-
Force copy mode. Default false.
bool$overwrite optional-
Overwrite existing files.
Returns
void_remove() protected
_remove(array<string, mixed> $config): bool
Remove folder/symlink.
Parameters
array<string, mixed>$config-
Plugin config.
Returns
boolProperty Detail
$args protected
Arguments
Type
Cake\Console\Arguments$io protected
Console IO
Type
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