PHP Трейт Nextras\Forms\Controls\Fragments\ComponentControlTrait

Автор: Jan Skrasek
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
$onAnchor function (self $sender); Occurs when component is attached to presenter

Защищенные свойства (Protected)

Свойство Тип Описание
$params array

Открытые методы

Метод Описание
__clone ( ) Object cloning.
_isCloning ( ) : null | Nette\ComponentModel\IComponent Is container cloning now?
addComponent ( Nette\ComponentModel\IComponent $component, $name, $insertBefore = NULL ) : self Adds the specified component to the IContainer.
checkRequirements ( $element ) : void Checks for requirements such as authorization.
formatSignalMethod ( $signal ) : string Formats signal handler method name -> case sensitivity doesn't matter.
getComponent ( $name, $need = TRUE ) : Nette\ComponentModel\IComponent | null Returns component specified by name or path.
getComponents ( $deep = FALSE, $filterType = NULL ) : ArrayIterator Iterates over components.
getParam ( $name = NULL, $default = NULL )
getParameter ( $name, $default = NULL ) : mixed Returns component param.
getParameterId ( $name ) : string Returns a fully-qualified name that uniquely identifies the parameter.
getParameters ( ) : array Returns component parameters.
getPersistentParams ( ) : array Returns array of classes persistent parameters. They have public visibility and are non-static.
getPresenter ( $need = TRUE ) : Nette\Application\UI\Presenter | null Returns the presenter where this component belongs to.
getReflection ( ) : Nette\Application\UI\ComponentReflection Access to reflection.
getUniqueId ( ) : string Returns a fully-qualified name that uniquely identifies the component within the presenter hierarchy.
link ( $destination, $args = [] ) : string Generates URL to presenter, action or signal.
loadState ( array $params ) : void Loads state informations.
offsetExists ( $name ) : boolean Does component specified by name exists?
offsetGet ( $name ) : Nette\ComponentModel\IComponent Returns component specified by name. Throws exception if component doesn't exist.
offsetSet ( $name, $component ) : void Adds the component to the container.
offsetUnset ( $name ) : void Removes component from the container.
removeComponent ( Nette\ComponentModel\IComponent $component ) : void Removes a component from the IContainer.
saveState ( array &$params, $reflection = NULL ) : void Saves state informations for next request.
signalReceived ( $signal ) : void Calls signal handler method.

Защищенные методы

Метод Описание
attached ( $presenter ) : void This method will be called when the component (or component's parent) becomes attached to a monitored object. Do not call this method yourself.
createComponent ( $name ) : Nette\ComponentModel\IComponent Component factory. Delegates the creation of components to a createComponent method.
tryCall ( $method, array $params ) : boolean Calls public method if exists.
validateChildComponent ( Nette\ComponentModel\IComponent $child ) : void Descendant can override this method to disallow insert a child by throwing an Nette\InvalidStateException.
validateParent ( Nette\ComponentModel\IContainer $parent ) : void

Описание методов

__clone() публичный Метод

Object cloning.
public __clone ( )

_isCloning() публичный Метод

Is container cloning now?
public _isCloning ( ) : null | Nette\ComponentModel\IComponent
Результат null | Nette\ComponentModel\IComponent

addComponent() публичный Метод

Adds the specified component to the IContainer.
public addComponent ( Nette\ComponentModel\IComponent $component, $name, $insertBefore = NULL ) : self
$component Nette\ComponentModel\IComponent
Результат self

attached() защищенный Метод

This method will be called when the component (or component's parent) becomes attached to a monitored object. Do not call this method yourself.
protected attached ( $presenter ) : void
Результат void

checkRequirements() публичный Метод

Checks for requirements such as authorization.
public checkRequirements ( $element ) : void
Результат void

createComponent() защищенный Метод

Component factory. Delegates the creation of components to a createComponent method.
protected createComponent ( $name ) : Nette\ComponentModel\IComponent
Результат Nette\ComponentModel\IComponent the created component (optionally)

formatSignalMethod() публичный статический Метод

Formats signal handler method name -> case sensitivity doesn't matter.
public static formatSignalMethod ( $signal ) : string
Результат string

getComponent() публичный Метод

Returns component specified by name or path.
public getComponent ( $name, $need = TRUE ) : Nette\ComponentModel\IComponent | null
Результат Nette\ComponentModel\IComponent | null

getComponents() публичный Метод

Iterates over components.
public getComponents ( $deep = FALSE, $filterType = NULL ) : ArrayIterator
Результат ArrayIterator

getParam() публичный Метод

Устаревший:
public getParam ( $name = NULL, $default = NULL )

getParameter() публичный Метод

Returns component param.
public getParameter ( $name, $default = NULL ) : mixed
Результат mixed

getParameterId() публичный Метод

Returns a fully-qualified name that uniquely identifies the parameter.
public getParameterId ( $name ) : string
Результат string

getParameters() публичный Метод

Returns component parameters.
public getParameters ( ) : array
Результат array

getPersistentParams() публичный статический Метод

This default implementation detects persistent parameters by annotation @persistent.
public static getPersistentParams ( ) : array
Результат array

getPresenter() публичный Метод

Returns the presenter where this component belongs to.
public getPresenter ( $need = TRUE ) : Nette\Application\UI\Presenter | null
Результат Nette\Application\UI\Presenter | null

getReflection() публичный статический Метод

Access to reflection.
public static getReflection ( ) : Nette\Application\UI\ComponentReflection
Результат Nette\Application\UI\ComponentReflection

getUniqueId() публичный Метод

Returns a fully-qualified name that uniquely identifies the component within the presenter hierarchy.
public getUniqueId ( ) : string
Результат string

loadState() публичный Метод

Loads state informations.
public loadState ( array $params ) : void
$params array
Результат void

offsetExists() публичный Метод

Does component specified by name exists?
public offsetExists ( $name ) : boolean
Результат boolean

offsetGet() публичный Метод

Returns component specified by name. Throws exception if component doesn't exist.
public offsetGet ( $name ) : Nette\ComponentModel\IComponent
Результат Nette\ComponentModel\IComponent

offsetSet() публичный Метод

Adds the component to the container.
public offsetSet ( $name, $component ) : void
Результат void

offsetUnset() публичный Метод

Removes component from the container.
public offsetUnset ( $name ) : void
Результат void

removeComponent() публичный Метод

Removes a component from the IContainer.
public removeComponent ( Nette\ComponentModel\IComponent $component ) : void
$component Nette\ComponentModel\IComponent
Результат void

saveState() публичный Метод

Saves state informations for next request.
public saveState ( array &$params, $reflection = NULL ) : void
$params array
Результат void

signalReceived() публичный Метод

Calls signal handler method.
public signalReceived ( $signal ) : void
Результат void

tryCall() защищенный Метод

Calls public method if exists.
protected tryCall ( $method, array $params ) : boolean
$params array
Результат boolean does method exist?

validateChildComponent() защищенный Метод

Descendant can override this method to disallow insert a child by throwing an Nette\InvalidStateException.
protected validateChildComponent ( Nette\ComponentModel\IComponent $child ) : void
$child Nette\ComponentModel\IComponent
Результат void

validateParent() защищенный Метод

protected validateParent ( Nette\ComponentModel\IContainer $parent ) : void
$parent Nette\ComponentModel\IContainer
Результат void

Описание свойств

$onAnchor публичное свойство

function (self $sender); Occurs when component is attached to presenter
public $onAnchor

$params защищенное свойство

protected array $params
Результат array