Actions and filters helper class

access public
package kocuj_internal_lib
inherited_from \KocujIL\V12a\Classes\ComponentObject

 Methods

Call method

__call(string $method, array $arguments) : boolean | float | integer | object | string
access public

Parameters

$method

string

Method to call

$arguments

array

Arguments

Returns

booleanfloatintegerobjectstringReturned value

Constructor

__construct(object $projectObj) : void
Inherited
access public

Parameters

$projectObj

object

\KocujIL\V12a\Classes\Project object for current project

Add action callback from component which will be initialized only when needed

addActionWhenNeeded(string $action, integer $callbackComponentProjectCategory, string $callbackComponent, string $callbackComponentFragment, string $callbackMethod, integer $prior = 10, integer $argumentsCount = 1) : void
access public

Parameters

$action

string

Action hook

$callbackComponentProjectCategory

integer

Callback component category; must be one of the following constants from \KocujIL\V12a\Enums\ProjectCategory: CORE (for "core" category), ALL (for "all" category), FRONTEND (for "frontend" category) or BACKEND (for "backend" category)

$callbackComponent

string

Callback component

$callbackComponentFragment

string

Callback component fragment

$callbackMethod

string

Callback method

$prior

integer

Action callback priority - default: 10

$argumentsCount

integer

Action callback arguments count - default: 1

Add filter callback from component which will be initialized only when needed

addFilterWhenNeeded(string $filter, integer $callbackComponentProjectCategory, string $callbackComponent, string $callbackComponentFragment, string $callbackMethod, integer $prior = 10, integer $argumentsCount = 1) : void
access public

Parameters

$filter

string

Filter hook

$callbackComponentProjectCategory

integer

Callback component category; must be one of the following constants from \KocujIL\V12a\Enums\ProjectCategory: CORE (for "core" category), ALL (for "all" category), FRONTEND (for "frontend" category) or BACKEND (for "backend" category)

$callbackComponent

string

Callback component

$callbackComponentFragment

string

Callback component fragment

$callbackMethod

string

Callback method

$prior

integer

Filter callback priority - default: 10

$argumentsCount

integer

Filter callback arguments count - default: 1

Get object of class type from component

getComponent(string $type, integer $projectCategory = \KocujIL\V12a\Enums\ProjectCategory::CORE, string $fragment = '') : object
Inherited
access public

Parameters

$type

string

Component type

$projectCategory

integer

Component category; must be one of the following constants from \KocujIL\V12a\Enums\ProjectCategory: CORE (for "core" category), ALL (for "all" category), FRONTEND (for "frontend" category) or BACKEND (for "backend" category) - default: \KocujIL\V12a\Enums\ProjectCategory::CORE

$fragment

string

Component fragment - default: empty

Returns

objectObject of class type from component

Get object of type \KocujIL\V12a\Classes\Project

getProjectObj() : object
Inherited
access public

Returns

objectObject of type \KocujIL\V12a\Classes\Project

Get object of class type for strings from component

getStrings(string $type, integer $projectCategory = \KocujIL\V12a\Enums\ProjectCategory::CORE) : object
Inherited
access public

Parameters

$type

string

Component type

$projectCategory

integer

Component category; must be one of the following constants from \KocujIL\V12a\Enums\ProjectCategory: CORE (for "core" category), ALL (for "all" category), FRONTEND (for "frontend" category) or BACKEND (for "backend" category) - default: \KocujIL\V12a\Enums\ProjectCategory::CORE

Returns

objectObject of class type for strings from component

Add action or filter callback from component which will be initialized only when needed

addActionOrFilterWhenNeeded(string $actionOrFilter, integer $callbackComponentProjectCategory, string $callbackComponent, string $callbackComponentFragment, string $callbackMethod, integer $prior, integer $argumentsCount, boolean $isFilter) : void
access private

Parameters

$actionOrFilter

string

Action or filter hook

$callbackComponentProjectCategory

integer

Callback component category; must be one of the following constants from \KocujIL\V12a\Enums\ProjectCategory: CORE (for "core" category), ALL (for "all" category), FRONTEND (for "frontend" category) or BACKEND (for "backend" category)

$callbackComponent

string

Callback component

$callbackComponentFragment

string

Callback component fragment

$callbackMethod

string

Callback method

$prior

integer

Action or filter callback priority

$argumentsCount

integer

Action or filter callback arguments count

$isFilter

boolean

It is filter (true) or action (false)

 Properties

 

Callbacks data

$callbacks : array

Default

array()
access private
 

\KocujIL\V12a\Classes\Project object for current project

$projectObj : object

Default

NULL
access private