Class Component
Component sersvices as the hightest and most abstract super class for all components.
Component supports complex serialisation @see PiconSerializer Component automatically injects resources on instantiation @see Injector
A component must have a unique ID that is passed in the constructor. The ID need only be unique amoung sibling component in the component hierarchy.
Components are organised into a simple hierachy. With the exception of the ultimate parent at the top of the hierarchy, a component will always have a parent.
If the component is an instance of MarkupContainer it can have children added to it.
- picon\Component implements picon\InjectOnWakeup, picon\Identifiable, picon\Detachable
Indirect known subclasses
ErrorPage, picon\AbstractChoice, picon\Border, picon\Button, picon\Check, picon\CheckBox, picon\CheckBoxGroup, picon\CheckChoice, picon\DataGridView, picon\DataTable, picon\DateField, picon\DefaultDataTable, picon\AbstractLink, picon\DropDown, picon\EmptyPanel, picon\FeedbackPanel, picon\FileUploadField, picon\Form, picon\FormComponent, picon\FormComponentLabel, picon\FormComponentPanel, picon\GridItem, picon\GridView, picon\AbstractMultipleChoice, picon\HeaderContainer, picon\HeaderPartContainer, picon\HeaderToolbar, picon\Label, picon\LabeledMarkupContainer, picon\Link, picon\ListItem, picon\ListMultiple, picon\ListView, picon\ModalWindow, picon\AbstractRepeater, picon\NavigationLink, picon\NavigationToolbar, picon\Navigator, picon\PageNotFoundPage, picon\PaginatingGridView, picon\Panel, picon\PasswordField, picon\Radio, picon\RadioChoice, picon\RadioGroup, picon\AbstractSingleChoice, picon\RepeatingView, picon\RequiredTextField, picon\StaticTabPanel, picon\TabPanel, picon\TextArea, picon\TextField, picon\TransparentMarkupContainer, picon\WebPage, SessionExpiredPage, picon\AbstractTextComponent, picon\AbstractToolbar, picon\AjaxButton, picon\AjaxLinkNamespace: picon
Package: web
Author: Martin Cassidy
Todo: finish adding state flags so that checks can be run to ensure overriden methods are calling the parent implementation
Located at web/Component.php
public
|
#
__construct( string $id,
Create a new component. Any overrides of the constructor must call the super. |
protected
|
#
onInitialize( )
Called when the component hierarchy above this compoent is complete If overriding this method you MUST call parent::onInitialize() |
final protected
|
|
public
|
|
public
|
|
final protected
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
final protected
|
|
public
|
|
protected
|
|
abstract protected
|
|
protected
|
#
onComponentTag(
This is called imediatly before the tag is written to the output This method allows direct manipulation of the object representing the actual markup element that is to be rendered. |
public
|
|
public
|
#
setMarkupId( string $id )
Manually set the markup id. Note, using this makes it your responsability to ensure the id is unique |
public
|
|
protected
|
|
protected
|
#
checkComponentTag(
Checks that a component tag is a tag of the required name Throws an IllegalStateException if it is not |
protected
|
#
checkComponentTagAttribute(
Checks that a component tag as an attribute and that the attribute has the required value Throws an IllegalStateException if it is not |
public
|
#
visitParents(
Visit all the parent components of this components and execute a callback on each |
public
|
|
protected
|
|
final public
|
|
final public
|
|
final public
|
|
final public
|
|
public
|
|
public static
|
|
public
boolean
|
|
public
|
|
public
type
|
|
public
type
|
|
public
|
|
public
type
|
|
public
|
|
protected
|
|
public
|
|
public
|
|
public
|
|
public
|
|
protected
|
|
public
|
|
public
|
|
public
|
|
public
string
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
final public
|
#
renderHeadContainer(
Called by the header container when the HTML <head> is rendering |
public
|
#
renderHead(
Called for each component when the HTML <head> is rendering. |
public
|
#
setRenderBodyOnly( boolean $renderBodyOnly )
Sets whether this component will render its open and close tags |
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
string
|
TYPE_STRING
|
'string' |
|
string
|
TYPE_FLOAT
|
'float' |
|
string
|
TYPE_BOOL
|
'boolean' |
|
string
|
TYPE_DOUBLE
|
'double' |
|
string
|
TYPE_INT
|
'integer' |
|
string
|
TYPE_ARRAY
|
'array' |
|
integer
|
VISITOR_CONTINUE_TRAVERSAL
|
1 |
|
integer
|
VISITOR_STOP_TRAVERSAL
|
2 |
|
integer
|
VISITOR_CONTINUE_TRAVERSAL_NO_DEEPER
|
3 |
|
string
|
PATH_SEPERATOR
|
':' |
protected
boolean
|
$added | false |
#
true if this component is in the hierarchy |