W3cubDocs

/CakePHP 4.1

Trait PluginAssetsTrait

trait for symlinking / copying plugin assets to app's webroot.

Namespace: Cake\Command

Properties summary

  • $args protected
    \Cake\Console\Arguments

    Arguments

  • $io protected
    \Cake\Console\ConsoleIo

    Console IO

Method Summary

Method Detail

_copyDirectory() protected

_copyDirectory(string $source, string $destination)

Copy directory

Parameters

string $source

Source directory

string $destination

Destination directory

Returns

bool

_createDirectory() protected

_createDirectory(string $dir)

Create directory

Parameters

string $dir

Directory name

Returns

bool
_createSymlink(string $target, string $link)

Create symlink

Parameters

string $target

Target directory

string $link

Link name

Returns

bool

_list() protected

_list(?string $name)

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

List of plugins with meta data.

_process() protected

_process(array $plugins, bool $copy, bool $overwrite)

Process plugins

Parameters

array $plugins

List of plugins to process

bool $copy optional

Force copy mode. Default false.

bool $overwrite optional

Overwrite existing files.

_remove() protected

_remove(array $config)

Remove folder/symlink.

Parameters

array $config

Plugin config.

Returns

bool

Property 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.1/trait-Cake.Command.PluginAssetsTrait.html