PHP Trait Nextras\Forms\Controls\Fragments\ComponentControlTrait

Author: Jan Skrasek
Afficher le fichier Open project: nextras/forms

Méthodes publiques

Свойство Type Description
$onAnchor function (self $sender); Occurs when component is attached to presenter

Protected Properties

Свойство Type Description
$params array

Méthodes publiques

Méthode Description
__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.

Méthodes protégées

Méthode Description
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

Method Details

__clone() public méthode

Object cloning.
public __clone ( )

_isCloning() public méthode

Is container cloning now?
public _isCloning ( ) : null | Nette\ComponentModel\IComponent
Résultat null | Nette\ComponentModel\IComponent

addComponent() public méthode

Adds the specified component to the IContainer.
public addComponent ( Nette\ComponentModel\IComponent $component, $name, $insertBefore = NULL ) : self
$component Nette\ComponentModel\IComponent
Résultat self

attached() protected méthode

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
Résultat void

checkRequirements() public méthode

Checks for requirements such as authorization.
public checkRequirements ( $element ) : void
Résultat void

createComponent() protected méthode

Component factory. Delegates the creation of components to a createComponent method.
protected createComponent ( $name ) : Nette\ComponentModel\IComponent
Résultat Nette\ComponentModel\IComponent the created component (optionally)

formatSignalMethod() public static méthode

Formats signal handler method name -> case sensitivity doesn't matter.
public static formatSignalMethod ( $signal ) : string
Résultat string

getComponent() public méthode

Returns component specified by name or path.
public getComponent ( $name, $need = TRUE ) : Nette\ComponentModel\IComponent | null
Résultat Nette\ComponentModel\IComponent | null

getComponents() public méthode

Iterates over components.
public getComponents ( $deep = FALSE, $filterType = NULL ) : ArrayIterator
Résultat ArrayIterator

getParam() public méthode

Deprecation:
public getParam ( $name = NULL, $default = NULL )

getParameter() public méthode

Returns component param.
public getParameter ( $name, $default = NULL ) : mixed
Résultat mixed

getParameterId() public méthode

Returns a fully-qualified name that uniquely identifies the parameter.
public getParameterId ( $name ) : string
Résultat string

getParameters() public méthode

Returns component parameters.
public getParameters ( ) : array
Résultat array

getPersistentParams() public static méthode

This default implementation detects persistent parameters by annotation @persistent.
public static getPersistentParams ( ) : array
Résultat array

getPresenter() public méthode

Returns the presenter where this component belongs to.
public getPresenter ( $need = TRUE ) : Nette\Application\UI\Presenter | null
Résultat Nette\Application\UI\Presenter | null

getReflection() public static méthode

Access to reflection.
public static getReflection ( ) : Nette\Application\UI\ComponentReflection
Résultat Nette\Application\UI\ComponentReflection

getUniqueId() public méthode

Returns a fully-qualified name that uniquely identifies the component within the presenter hierarchy.
public getUniqueId ( ) : string
Résultat string

loadState() public méthode

Loads state informations.
public loadState ( array $params ) : void
$params array
Résultat void

offsetExists() public méthode

Does component specified by name exists?
public offsetExists ( $name ) : boolean
Résultat boolean

offsetGet() public méthode

Returns component specified by name. Throws exception if component doesn't exist.
public offsetGet ( $name ) : Nette\ComponentModel\IComponent
Résultat Nette\ComponentModel\IComponent

offsetSet() public méthode

Adds the component to the container.
public offsetSet ( $name, $component ) : void
Résultat void

offsetUnset() public méthode

Removes component from the container.
public offsetUnset ( $name ) : void
Résultat void

removeComponent() public méthode

Removes a component from the IContainer.
public removeComponent ( Nette\ComponentModel\IComponent $component ) : void
$component Nette\ComponentModel\IComponent
Résultat void

saveState() public méthode

Saves state informations for next request.
public saveState ( array &$params, $reflection = NULL ) : void
$params array
Résultat void

signalReceived() public méthode

Calls signal handler method.
public signalReceived ( $signal ) : void
Résultat void

tryCall() protected méthode

Calls public method if exists.
protected tryCall ( $method, array $params ) : boolean
$params array
Résultat boolean does method exist?

validateChildComponent() protected méthode

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
Résultat void

validateParent() protected méthode

protected validateParent ( Nette\ComponentModel\IContainer $parent ) : void
$parent Nette\ComponentModel\IContainer
Résultat void

Property Details

$onAnchor public_oe property

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

$params protected_oe property

protected array $params
Résultat array