Class PresenterComponent (namespace Nette\Application)
PresenterComponent is the base class for all presenters components.
Components are persistent objects located on a presenter. They have ability to own other child components, and interact with user. Components have properties for storing their status, and responds to user command.
Object | --Component | --ComponentContainer | --PresenterComponent
Implements interfaces:
Direct Known Sub-classes:
Public Method Summary | |
---|---|
PresenterComponent |
|
void |
ajaxLink
($destination, [$args =
array() ])
|
string |
formatSignalMethod
(string $signal)
Formats signal handler method name -> case sensitivity doesn't matter.
|
mixed |
Returns component param.
|
string |
getParamId
($name)
Returns a fully-qualified name that uniquely identifies the parameter.
|
static array |
Returns array of classes persistent parameters. They have public visibility and are non-static.
|
Presenter|NULL |
getPresenter
([bool $need =
TRUE ])
Returns the presenter where this component belongs to.
|
string |
getUniqueId
()
Returns a fully-qualified name that uniquely identifies the component within the presenter hierarchy.
|
void |
lazyLink
($destination, [$args =
array() ])
|
string |
link
(string $destination, [array|mixed $args =
array() ])
Generates URL to presenter, action or signal.
|
void |
loadState
($params)
Loads state informations.
|
void |
Redirect to another presenter, action or signal.
|
void |
saveState
(&$params, [portion $forClass =
NULL ])
Saves state informations for next request.
|
void |
signalReceived
(string $signal)
Calls signal handler method.
|
Protected Method Summary | |
---|---|
protected void |
attached
(IComponent $presenter)
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 bool |
tryCall
(string $method, $params)
Calls public method if exists.
|
Methods Inherited From ComponentContainer |
---|
addComponent(), createComponent(), getComponent(), getComponents(), removeComponent(), validateChildComponent(), __clone() |
Methods Inherited From Component |
---|
__construct(), attached(), detached(), getName(), getParent(), getService(), getServiceLocator(), lookup(), lookupPath(), monitor(), setParent(), setServiceLocator(), validateParent(), __clone(), __wakeup() |
Methods Inherited From Object |
---|
extensionMethod(), getClass(), getReflection(), __call(), __callStatic(), __get(), __isset(), __set(), __unset() |
Variable Summary | ||||
---|---|---|---|---|
protected array | $params | array() |
line 45 |
Method Details | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
line 51 __constructpublic PresenterComponent __construct ([$parent = Overridden in child classes as:
|
||||||||||||||||||||||||
line 306 ajaxLinkpublic void ajaxLink ($destination, [$args =
|
||||||||||||||||||||||||
line 89 attachedprotected void attached (IComponent $presenter) This method will be called when the component (or component's parent) becomes attached to a monitored object. Do not call this method yourself.
|
||||||||||||||||||||||||
line 259 formatSignalMethodpublic string formatSignalMethod (string $signal) Formats signal handler method name -> case sensitivity doesn't matter.
|
||||||||||||||||||||||||
line 189 getParampublic mixed getParam ([string $name = Returns component param. If no key is passed, returns the entire array.
|
||||||||||||||||||||||||
line 208 getParamIdpublic string getParamId ($name) Returns a fully-qualified name that uniquely identifies the parameter.
|
||||||||||||||||||||||||
line 221 getPersistentParamspublic static array getPersistentParams () Returns array of classes persistent parameters. They have public visibility and are non-static. This default implementation detects persistent parameters by annotation @persistent.
|
||||||||||||||||||||||||
line 64 getPresenterpublic Presenter|NULL getPresenter ([bool $need = Returns the presenter where this component belongs to. Overridden in child classes as:
|
||||||||||||||||||||||||
line 76 getUniqueIdpublic string getUniqueId () Returns a fully-qualified name that uniquely identifies the component within the presenter hierarchy. Overridden in child classes as:
|
||||||||||||||||||||||||
line 294 lazyLinkpublic void lazyLink ($destination, [$args =
|
||||||||||||||||||||||||
line 277 linkpublic string link (string $destination, [array|mixed $args = Generates URL to presenter, action or signal.
|
||||||||||||||||||||||||
line 126 loadStatepublic void loadState ($params) Loads state informations. Implementation of:
|
||||||||||||||||||||||||
line 321 redirectpublic void redirect (int $code, [string $destination = Redirect to another presenter, action or signal.
|
||||||||||||||||||||||||
line 148 saveStatepublic void saveState (&$params, [portion $forClass = Saves state informations for next request. Implementation of:
|
||||||||||||||||||||||||
line 245 signalReceivedpublic void signalReceived (string $signal) Calls signal handler method. Implementation of:
|
||||||||||||||||||||||||
line 104 tryCallprotected bool tryCall (string $method, $params) Calls public method if exists.
|