Fr3nch13/CakePHP Utilities

Plugin extends BasePlugin
in package

CakePHP Utilities Plugin

The main entrypoint of this plugin.

Table of Contents

Properties

$bootstrapEnabled  : bool
Do bootstrapping or not
$classPath  : string
The class path for this plugin.
$configPath  : string
The config path for this plugin.
$consoleEnabled  : bool
Console middleware
$middlewareEnabled  : bool
Enable middleware
$name  : string
The name of this plugin
$path  : string
The path to this plugin.
$routesEnabled  : bool
Load routes or not
$servicesEnabled  : bool
Register container services
$templatePath  : string
The templates path for this plugin.

Methods

__construct()  : mixed
Constructor
bootstrap()  : void
Bootstraping for this specific plugin.
console()  : CommandCollection
Add console commands for the plugin.
disable()  : $this
Disables the named hook
enable()  : $this
Enables the named hook
getClassPath()  : string
Get the filesystem path to configuration for this plugin
getConfigPath()  : string
Get the filesystem path to configuration for this plugin
getName()  : string
Get the name of this plugin.
getPath()  : string
Get the filesystem path to this plugin
getTemplatePath()  : string
Get the filesystem path to templates for this plugin
initialize()  : void
Initialization hook called from constructor.
isEnabled()  : bool
Check if the named hook is enabled
middleware()  : MiddlewareQueue
Add middleware for the plugin.
routes()  : void
Add plugin specific routes here.
services()  : void
Register container services for this plugin.
checkHook()  : void
Check if a hook name is valid

Properties

$bootstrapEnabled

Do bootstrapping or not

protected bool $bootstrapEnabled = true

$classPath

The class path for this plugin.

protected string $classPath

$configPath

The config path for this plugin.

protected string $configPath

$consoleEnabled

Console middleware

protected bool $consoleEnabled = true

$middlewareEnabled

Enable middleware

protected bool $middlewareEnabled = true

$name

The name of this plugin

protected string $name

$path

The path to this plugin.

protected string $path

$routesEnabled

Load routes or not

protected bool $routesEnabled = true

$servicesEnabled

Register container services

protected bool $servicesEnabled = true

$templatePath

The templates path for this plugin.

protected string $templatePath

Methods

__construct()

Constructor

public __construct([array<string, mixed> $options = [] ]) : mixed
Parameters
$options : array<string, mixed> = []

Options

disable()

Disables the named hook

public disable(string $hook) : $this
Parameters
$hook : string

The hook to disable

Tags
inheritDoc
Return values
$this

enable()

Enables the named hook

public enable(string $hook) : $this
Parameters
$hook : string

The hook to disable

Tags
inheritDoc
Return values
$this

getClassPath()

Get the filesystem path to configuration for this plugin

public getClassPath() : string
Tags
inheritDoc
Return values
string

getConfigPath()

Get the filesystem path to configuration for this plugin

public getConfigPath() : string
Tags
inheritDoc
Return values
string

getName()

Get the name of this plugin.

public getName() : string
Tags
inheritDoc
Return values
string

getPath()

Get the filesystem path to this plugin

public getPath() : string
Tags
inheritDoc
Return values
string

getTemplatePath()

Get the filesystem path to templates for this plugin

public getTemplatePath() : string
Tags
inheritDoc
Return values
string

initialize()

Initialization hook called from constructor.

public initialize() : void

isEnabled()

Check if the named hook is enabled

public isEnabled(string $hook) : bool
Parameters
$hook : string

The hook to check

Tags
inheritDoc
Return values
bool

checkHook()

Check if a hook name is valid

protected checkHook(string $hook) : void
Parameters
$hook : string

The hook name to check

Tags
throws
InvalidArgumentException

on invalid hooks


        
On this page

Search results