CakePHP
  • Documentation
    • Book
    • API
    • Videos
    • Reporting Security Issues
    • Privacy Policy
    • Logos & Trademarks
  • Business Solutions
  • Swag
  • Road Trip
  • Team
  • Community
    • Community
    • Get Involved
    • Issues (Github)
    • Bakery
    • Featured Resources
    • Training
    • Meetups
    • My CakePHP
    • CakeFest
    • Newsletter
    • Linkedin
    • YouTube
    • Facebook
    • Twitter
    • Mastodon
    • Help & Support
    • Forum
    • Stack Overflow
    • IRC
    • Slack
    • Paid Support
CakePHP

C CakePHP 4.6 Strawberry API

  • Project:
    • CakePHP
      • CakePHP
      • Authentication
      • Authorization
      • Chronos
      • Elastic Search
      • Queue
  • Version:
    • 4.6
      • 5.2
      • 5.1
      • 5.0
      • 4.6
      • 4.5
      • 4.4
      • 4.3
      • 4.2
      • 4.1
      • 4.0
      • 3.10
      • 3.9
      • 3.8
      • 3.7
      • 3.6
      • 3.5
      • 3.4
      • 3.3
      • 3.2
      • 3.1
      • 3.0
      • 2.10
      • 2.9
      • 2.8
      • 2.7
      • 2.6
      • 2.5
      • 2.4
      • 2.3
      • 2.2
      • 2.1
      • 2.0
      • 1.3
      • 1.2

Namespaces

  • Global
  • Cake
    • Auth
    • Cache
    • Collection
    • Command
    • Console
    • Controller
    • Core
    • Database
    • Datasource
    • Error
    • Event
    • Filesystem
    • Form
    • Http
    • I18n
    • Log
    • Mailer
    • Network
    • ORM
    • Routing
    • Shell
    • TestSuite
    • Utility
    • Validation
    • View

Trait PluginAssetsTrait

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

Namespace: Cake\Command

Property Summary

  • $args protected
    Cake\Console\Arguments

    Arguments

  • $io protected
    Cake\Console\ConsoleIo

    Console IO

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
bool

Property Detail

$args ¶ protected

Arguments

Type
Cake\Console\Arguments

$io ¶ protected

Console IO

Type
Cake\Console\ConsoleIo
OpenHub
Pingping
Linode
  • Business Solutions
  • Showcase
  • Documentation
  • Book
  • API
  • Videos
  • Reporting Security Issues
  • Privacy Policy
  • Logos & Trademarks
  • Community
  • Get Involved
  • Issues (Github)
  • Bakery
  • Featured Resources
  • Training
  • Meetups
  • My CakePHP
  • CakeFest
  • Newsletter
  • Linkedin
  • YouTube
  • Facebook
  • Twitter
  • Mastodon
  • Help & Support
  • Forum
  • Stack Overflow
  • IRC
  • Slack
  • Paid Support

Generated using CakePHP API Docs