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:
| Constructor Summary | |
|---|---|
| public |
|
| Method Summary | |
|---|---|
| void |
ajaxLink
($destination, [$args =
array()])
|
| 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 string |
formatSignalMethod
(string $signal)
Formats signal handler method name -> case sensitivity doesn't matter.
|
| mixed |
Returns component param.
|
| string |
getParamId
($key)
Returns a fully-qualified name that uniquely identifies the parameter.
|
| 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, view or signal.
|
| void |
loadState
($params)
Loads state informations.
|
| void |
Redirect to another presenter, view or signal.
|
| void |
saveState
(&$params, [portion $forClass =
NULL])
Saves state informations for next request.
|
| void |
signalReceived
(string $signal)
Calls signal handler method.
|
| protected bool |
tryCall
(string $method, $params)
Calls public method if exists.
|
| Variable Summary | ||||
|---|---|---|---|---|
| protected array | $params | array() |
line 47 |
|
| Constructor Details | |||||||||
|---|---|---|---|---|---|---|---|---|---|
|
line 53 __constructpublic __construct ([$parent =
|
|||||||||
| Method Details | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
line 286 ajaxLinkpublic void ajaxLink ($destination, [$args =
|
||||||||||||||||||||||||
|
line 91 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 239 formatSignalMethodprotected string formatSignalMethod (string $signal) Formats signal handler method name -> case sensitivity doesn't matter.
|
||||||||||||||||||||||||
|
line 188 getParampublic mixed getParam ([string $key = Returns component param. If no key is passed, returns the entire array.
|
||||||||||||||||||||||||
|
line 207 getParamIdpublic string getParamId ($key) Returns a fully-qualified name that uniquely identifies the parameter.
|
||||||||||||||||||||||||
|
line 66 getPresenterpublic Presenter|NULL getPresenter ([bool $need = Returns the presenter where this component belongs to. Overridden in child classes as:
|
||||||||||||||||||||||||
|
line 78 getUniqueIdpublic string getUniqueId () Returns a fully-qualified name that uniquely identifies the component within the presenter hierarchy. Overridden in child classes as:
|
||||||||||||||||||||||||
|
line 274 lazyLinkpublic void lazyLink ($destination, [$args =
|
||||||||||||||||||||||||
|
line 257 linkpublic string link (string $destination, [array|mixed $args = Generates URL to presenter, view or signal.
|
||||||||||||||||||||||||
|
line 128 loadStatepublic void loadState ($params) Loads state informations. Implementation of:
|
||||||||||||||||||||||||
|
line 301 redirectpublic void redirect (string $destination, [array $args = Redirect to another presenter, view or signal.
|
||||||||||||||||||||||||
|
line 147 saveStatepublic void saveState (&$params, [portion $forClass = Saves state informations for next request. Implementation of:
|
||||||||||||||||||||||||
|
line 225 signalReceivedpublic void signalReceived (string $signal) Calls signal handler method. Implementation of:
|
||||||||||||||||||||||||
|
line 106 tryCallprotected bool tryCall (string $method, $params) Calls public method if exists.
|
||||||||||||||||||||||||