Namespaces

  • Latte
    • Loaders
    • Macros
    • Runtime
  • Nette
    • Application
      • Responses
      • Routers
      • UI
    • Bridges
      • ApplicationDI
      • ApplicationLatte
      • ApplicationTracy
      • CacheDI
      • CacheLatte
      • DatabaseDI
      • DatabaseTracy
      • DITracy
      • FormsDI
      • FormsLatte
      • Framework
      • HttpDI
      • HttpTracy
      • MailDI
      • ReflectionDI
      • SecurityDI
      • SecurityTracy
    • Caching
      • Storages
    • ComponentModel
    • Database
      • Conventions
      • Drivers
      • Reflection
      • Table
    • DI
      • Config
        • Adapters
      • Extensions
    • Forms
      • Controls
      • Rendering
    • Http
    • Iterators
    • Loaders
    • Localization
    • Mail
    • Neon
    • PhpGenerator
    • Reflection
    • Security
    • Utils
  • none
  • Tracy
    • Bridges
      • Nette

Classes

  • Control
  • Form
  • Link
  • Multiplier
  • Presenter
  • PresenterComponent

Interfaces

  • IRenderable
  • ISignalReceiver
  • IStatePersistent
  • ITemplate
  • ITemplateFactory

Exceptions

  • BadSignalException
  • InvalidLinkException
  • Overview
  • Namespace
  • Class
  • Tree
  • Deprecated
  • Other releases
  • Nette homepage

Class PresenterComponent

PresenterComponent is the base class for all Presenter 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.

Nette\Object
Extended by Nette\ComponentModel\Component implements Nette\ComponentModel\IComponent
Extended by Nette\ComponentModel\Container implements Nette\ComponentModel\IContainer
Extended by Nette\Application\UI\PresenterComponent implements Nette\Application\UI\ISignalReceiver, Nette\Application\UI\IStatePersistent, ArrayAccess

Direct known subclasses

Nette\Application\UI\Control, Nette\Application\UI\Multiplier

Indirect known subclasses

Nette\Application\UI\Presenter
Abstract
Namespace: Nette\Application\UI
Located at Application/UI/PresenterComponent.php
Methods summary
public Nette\Application\UI\Presenter|null
# getPresenter( boolean $need = TRUE )

Returns the presenter where this component belongs to.

Returns the presenter where this component belongs to.

Parameters

$need
exception if presenter doesn't exist?

Returns

Nette\Application\UI\Presenter|null
Presenter|NULL
public string
# getUniqueId( )

Returns a fully-qualified name that uniquely identifies the component within the presenter hierarchy.

Returns a fully-qualified name that uniquely identifies the component within the presenter hierarchy.

Returns

string
string
protected
# attached( Nette\ComponentModel\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.

This method will be called when the component (or component's parent) becomes attached to a monitored object. Do not call this method yourself.

Parameters

$presenter

Overrides

Nette\ComponentModel\Component::attached()
protected
# validateParent( Nette\ComponentModel\IContainer $parent )

Throws

Nette\InvalidStateException
Nette\InvalidStateException

Overrides

Nette\ComponentModel\Component::validateParent()
protected boolean
# tryCall( string $method, array $params )

Calls public method if exists.

Calls public method if exists.

Parameters

$method
$params

Returns

boolean
does method exist?
public
# checkRequirements( $element )

Checks for requirements such as authorization.

Checks for requirements such as authorization.

public static PresenterComponentReflection
# getReflection( )

Access to reflection.

Access to reflection.

Returns

PresenterComponentReflection
PresenterComponentReflection

Overrides

Nette\Object::getReflection()
public
# loadState( array $params )

Loads state informations.

Loads state informations.

Parameters

$params

Implementation of

Nette\Application\UI\IStatePersistent::loadState()
public
# saveState( array & $params, PresenterComponentReflection $reflection = NULL )

Saves state informations for next request.

Saves state informations for next request.

Parameters

$params
$reflection
used by Presenter)

Implementation of

Nette\Application\UI\IStatePersistent::saveState()
public mixed
# getParameter( string $name, mixed $default = NULL )

Returns component param.

Returns component param.

Parameters

$name
key
$default
value

Returns

mixed
mixed
public array
# getParameters( )

Returns component parameters.

Returns component parameters.

Returns

array
array
public string
# getParameterId( string $name )

Returns a fully-qualified name that uniquely identifies the parameter.

Returns a fully-qualified name that uniquely identifies the parameter.

Parameters

$name

Returns

string
string
public
# getParam( $name = NULL, $default = NULL )

Deprecated

public 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.

Returns array of classes persistent parameters. They have public visibility and are non-static. This default implementation detects persistent parameters by annotation @persistent.

Returns

array
array
public
# signalReceived( string $signal )

Calls signal handler method.

Calls signal handler method.

Parameters

$signal

Throws

Nette\Application\UI\BadSignalException
if there is not handler method

Implementation of

Nette\Application\UI\ISignalReceiver::signalReceived()
public static string
# formatSignalMethod( string $signal )

Formats signal handler method name -> case sensitivity doesn't matter.

Formats signal handler method name -> case sensitivity doesn't matter.

Parameters

$signal

Returns

string
string
public string
# link( string $destination, array|mixed $args = array() )

Generates URL to presenter, action or signal.

Generates URL to presenter, action or signal.

Parameters

$destination
in format "[//] [[[module:]presenter:]action | signal! | this] [#fragment]"
$args

Returns

string
string

Throws

Nette\Application\UI\InvalidLinkException
InvalidLinkException
public Nette\Application\UI\Link
# lazyLink( string $destination, array|mixed $args = array() )

Returns destination as Link object.

Returns destination as Link object.

Parameters

$destination
in format "[//] [[[module:]presenter:]action | signal! | this] [#fragment]"
$args

Returns

Nette\Application\UI\Link
Link
public boolean
# isLinkCurrent( string $destination = NULL, array|mixed $args = array() )

Determines whether it links to the current page.

Determines whether it links to the current page.

Parameters

$destination
in format "[//] [[[module:]presenter:]action | signal! | this] [#fragment]"
$args

Returns

boolean
bool

Throws

Nette\Application\UI\InvalidLinkException
InvalidLinkException
public
# redirect( integer $code, string $destination = NULL, array|mixed $args = array() )

Redirect to another presenter, action or signal.

Redirect to another presenter, action or signal.

Parameters

$code
HTTP error code
$destination
in format "[//] [[[module:]presenter:]action | signal! | this] [#fragment]"
$args

Throws

Nette\Application\AbortException
Nette\Application\AbortException
public
# offsetSet( string $name, Nette\ComponentModel\IComponent $component )

Adds the component to the container.

Adds the component to the container.

Parameters

$name
name
$component

Implementation of

ArrayAccess::offsetSet()
public Nette\ComponentModel\IComponent
# offsetGet( string $name )

Returns component specified by name. Throws exception if component doesn't exist.

Returns component specified by name. Throws exception if component doesn't exist.

Parameters

$name
name

Returns

Nette\ComponentModel\IComponent
Nette\ComponentModel\IComponent

Throws

Nette\InvalidArgumentException
Nette\InvalidArgumentException

Implementation of

ArrayAccess::offsetGet()
public boolean
# offsetExists( string $name )

Does component specified by name exists?

Does component specified by name exists?

Parameters

$name
name

Returns

boolean
bool

Implementation of

ArrayAccess::offsetExists()
public
# offsetUnset( string $name )

Removes component from the container.

Removes component from the container.

Parameters

$name
name

Implementation of

ArrayAccess::offsetUnset()
Methods inherited from Nette\ComponentModel\Container
__clone(), addComponent(), createComponent(), getComponent(), getComponents(), removeComponent(), validateChildComponent()
Methods inherited from Nette\ComponentModel\Component
__construct(), __sleep(), __wakeup(), detached(), getName(), getParent(), lookup(), lookupPath(), monitor(), unmonitor()
Methods inherited from Nette\Object
__call(), __callStatic(), __get(), __isset(), __set(), __unset(), extensionMethod()
Methods inherited from Nette\ComponentModel\IComponent
setParent()
Constants inherited from Nette\ComponentModel\IComponent
NAME_SEPARATOR
Properties summary
protected array $params
#array()
Magic properties summary
public read-only Nette\Application\UI\Presenter $presenter
Magic properties inherited from Nette\ComponentModel\Container
$components
Magic properties inherited from Nette\ComponentModel\Component
$name, $parent
Magic properties inherited from Nette\Object
$reflection
Nette 2.3-20161221 API API documentation generated by ApiGen 2.8.0