phpClick
[ class tree: phpClick ] [ index: phpClick ] [ all elements ]

Class: Component

Source Location: /includes/Component.inc.php

Class Overview

XmlObject
   |
   --Component

This is the base class for each component. Typically it is not instantiated by itself.


Methods


Child classes:

ComponentButton
Represents a button component that can trigger and perform actions
ComponentCheckbox
Represents an image component. Also manages image upload and management
ComponentDataTable
Represents a component that displays database info in tabular format
ComponentDynamicOutput
Represents a component that can output the current values of input fields as well
ComponentHtmlText
Represents a text/HTML component that can store and display arbitrary HTML
ComponentImage
Represents an image component. Also manages image upload and management
ComponentInputText
Represents a text input field including input validation
ComponentRadiobuttonGroup
Represents a group of radiobuttons

Inherited Methods

Class: XmlObject

XmlObject::__construct()
XmlObject::getDom()
Returns a refernce to the DOMDocument that is at the root of this XML object
XmlObject::getFirstChildNodeByTagName()
Returns a reference to the first child XML node with a particular name
XmlObject::getOrCreateChildNodeByTagName()
Returns a reference to the first child XML node with a particular name.
XmlObject::getXmlNode()
Returns a reference to the DOMNode of this XML object
XmlObject::removeAllChildNodesByTagName()
Deletes all child nodes that have a particular name
XmlObject::setXmlNode()
Sets a refernce to the DOMNode.

Class Details

[line 5]
This is the base class for each component. Typically it is not instantiated by itself.



[ Top ]


Class Methods


constructor __construct [line 12]

Component __construct( mixed $oParentPage, [mixed $oComponentNode = NULL])

Construct a new component



Tags:

access:  public


Overridden in child classes as:

ComponentDataTable::__construct()
Creates a dataTable component.
ComponentDynamicOutput::__construct()
Creates a dynamicOutput component.

Overrides XmlObject::__construct() (parent method not documented)

[ Top ]

method createNewDatabaseFieldIfRequested [line 256]

void createNewDatabaseFieldIfRequested( )



Tags:

access:  public


[ Top ]

method doActionToUrlRedirections [line 149]

void doActionToUrlRedirections( mixed $sAction)



Tags:

access:  public


Overridden in child classes as:

ComponentButton::doActionToUrlRedirections()
ComponentDataTable::doActionToUrlRedirections()
ComponentRadiobuttonGroup::doActionToUrlRedirections()

[ Top ]

method getComponentCode [line 173]

string getComponentCode( )

Returns PHP code generated by the component which implements the component's functionality.

This function may be overwritten by a component.




Tags:

return:  PHP code
access:  public


Overridden in child classes as:

ComponentButton::getComponentCode()
Returns the code that is required to render the component on the screen. If the application is in the edit mode then it puts a little move icon along with the component to allow it to be moved.
ComponentCheckbox::getComponentCode()
Returns the code that is required to render the checkbox on the screen.
ComponentDataTable::getComponentCode()
Returns the code to render a data table.
ComponentDynamicOutput::getComponentCode()
Returns the html text
ComponentHtmlText::getComponentCode()
Returns the html text as it is. This text can be put in the final code as it is since the actual code is generated by the FCKEditor
ComponentImage::getComponentCode()
Returns the code that is required to render the image on the screen.
ComponentInputText::getComponentCode()
Returns the code that is required to render the component on the screen. If the application is in the edit mode then it puts a little move icon along with the component to allow it to be moved.
ComponentRadiobuttonGroup::getComponentCode()
Returns the code that is required to render the component on the screen. If the application is in the edit mode then it puts a little move icon along with the component to allow it to be moved.

[ Top ]

method getComponentCodeBeforeHtmlTag [line 186]

string getComponentCodeBeforeHtmlTag( )

Returns PHP code generated by the component which implements the component's functionality.

Code returned by this function is included before the starting <html> tag of the page and is therefore suitable to deal with input processing, page forwarding etc.

This function may be overwritten by a component.




Tags:

return:  PHP code
access:  public


Overridden in child classes as:

ComponentButton::getComponentCodeBeforeHtmlTag()
Returns code required to perform the actions to be performed on the button click as specified by the designer.
ComponentInputText::getComponentCodeBeforeHtmlTag()
Returns the code that goes before the HTML tag, this is essentially input text validation.
ComponentRadiobuttonGroup::getComponentCodeBeforeHtmlTag()
Returns PHP code that should be inserted before the HTML tag in the generated PHP file

[ Top ]

method getComponentIdExpandedDefault [line 216]

boolean getComponentIdExpandedDefault( )

Returns whether or not the input field for the component Id should be shown expanded by default or not (ie. collapsed). This function may be overwritten by individual components



Tags:

return:  TRUE if component ID input field should be shown as expanded
access:  public


Overridden in child classes as:

ComponentButton::getComponentIdExpandedDefault()
Returns whether or not the input field for the component Id should be shown expanded by default or not (ie. collapsed).
ComponentCheckbox::getComponentIdExpandedDefault()
Returns whether or not the input field for the component Id should be shown expanded by default or not (ie. collapsed).
ComponentInputText::getComponentIdExpandedDefault()
Returns whether or not the input field for the component Id should be shown expanded by default or not (ie. collapsed).
ComponentRadiobuttonGroup::getComponentIdExpandedDefault()
Returns whether or not the input field for the component Id should be shown expanded by default or not (ie. collapsed).

[ Top ]

method getHtmlEditorCustomization [line 197]

string getHtmlEditorCustomization( )

Returns javascript code to put a drop down in the HTML Editor tool bar for adding input fields and database field directly into the HTML text without typing it in. This function can be overridden if special buttons or dropdowns need to be added to the HTML Editor toolbar.



Tags:

return:  javascript code
access:  public


Overridden in child classes as:

ComponentDynamicOutput::getHtmlEditorCustomization()
Returns javascript code to put a drop down in the HTML Editor tool bar for adding input fields and database field directly into the HTML text without typing it in.

[ Top ]

method getId [line 23]

string getId( )

Returns the component's Id from the XML



Tags:

return:  The Id
access:  public


[ Top ]

method getParentApp [line 130]

Application getParentApp( )

Returns the parent Application of this component



Tags:

return:  A reference to the parent application containing this component
access:  public


[ Top ]

method getParentPage [line 121]

Page getParentPage( )

Returns the parent Page of this object



Tags:

return:  A reference to the parent page containing this object
access:  public


[ Top ]

method getType [line 141]

string getType( )

Returns the type of the component as text.

This function is overwritten by each component. It must be implemented.




Tags:

return:  Type of the component, e.g. "inputText", "htmlText" etc.
access:  public


Overridden in child classes as:

ComponentButton::getType()
Returns the type of the component i.e. button
ComponentCheckbox::getType()
Returns the type of the component i.e. checkbox
ComponentDataTable::getType()
Returns the type of the component i.e. dataTable
ComponentDynamicOutput::getType()
Returns the type of the component i.e. dynamicOutput
ComponentHtmlText::getType()
Returns the type of the component i.e. htmlText
ComponentImage::getType()
Returns the type of the component i.e. image
ComponentInputText::getType()
Returns the type of the component i.e. inputText
ComponentRadiobuttonGroup::getType()
Returns the type of the component i.e. radiobuttonGroup

[ Top ]

method getX [line 41]

int getX( )

Returns the component's X-screen coordinate from the XML



Tags:

return:  The X coordinate
access:  public


[ Top ]

method getY [line 59]

int getY( )

Returns the component's Y-screen coordinate from the XML



Tags:

return:  The Y coordinate
access:  public


[ Top ]

method getZ [line 77]

int getZ( )

Returns the component's Z-screen coordinate (the depth) from the XML



Tags:

return:  The Z coordinate
access:  public


[ Top ]

method handlePropertiesUi [line 162]

boolean handlePropertiesUi( boolean $bSuccessSoFar)

Responds to user input from the edit component screen, performs input validation and stores input values until they are saved or discarded.

This function is overwritten by each component. It must be implemented.




Tags:

return:  TRUE if no user input error occurred, FALSE otherwise
access:  public


Overridden in child classes as:

ComponentButton::handlePropertiesUi()
Responds to user input from the edit component screen, performs input validation and stores input values until they are saved or discarded
ComponentCheckbox::handlePropertiesUi()
Responds to user input from the edit component screen, this validates the input and simply stores the values entered by the user to the XML file.
ComponentDataTable::handlePropertiesUi()
Responds to user input from the edit component screen, performs input validation and stores input values until they are saved or discarded
ComponentDynamicOutput::handlePropertiesUi()
Responds to user input from the edit component screen, performs input validation and stores input values until they are saved or discarded
ComponentHtmlText::handlePropertiesUi()
Responds to user input from the edit component screen, performs input validation and stores input values until they are saved or discarded
ComponentImage::handlePropertiesUi()
Responds to user input from the edit component screen, performs input validation and stores input values until they are saved or discarded
ComponentInputText::handlePropertiesUi()
Responds to user input from the edit component screen, performs input validation and stores input values until they are saved or discarded
ComponentRadiobuttonGroup::handlePropertiesUi()
Responds to user input from the edit component screen, performs input validation and stores input values until they are saved or discarded

Parameters:

boolean   $bSuccessSoFar   whether all the properties input have been successful, this is required to let the handlePropertiesUi know that editComponent has already found a problem with the entered id so it should not create a database element corresponding to it.

[ Top ]

method isActive [line 107]

void isActive( )

Returns TRUE if this component is currently marked active



Tags:

access:  public


[ Top ]

method isComplete [line 206]

boolean isComplete( )

Returns true if complete functionality of the component has been defined, otherwise false



Tags:

return:  TRUE, if behavior completely defined else false
access:  public


Overridden in child classes as:

ComponentButton::isComplete()
Returns true if at least one action rule is defined for the button
ComponentCheckbox::isComplete()
Returns true if the input text has been associated with a database field or not. This is done by simply checking the database fieldname in the XML file.
ComponentInputText::isComplete()
Returns true if the input text field has been associated with a database field or not. This is done by simply checking the database fieldname in the XML file.
ComponentRadiobuttonGroup::isComplete()
Returns TRUE if the component is fully specified

[ Top ]

method printComponentHelp [line 376]

void printComponentHelp( string $sIndex)

This function is a wrapper which calls the global printHelp from common.inc.php



Tags:

access:  protected


Parameters:

string   $sIndex   help id specific to this component

[ Top ]

method printHtmlEditorUi [line 353]

void printHtmlEditorUi( mixed $sHtml)

Prints the UI for an HTML editor

This is only relevant for some components




Tags:

static:  
access:  public


[ Top ]

method printJavaScriptOnChangeFunction [line 225]

void printJavaScriptOnChangeFunction( )

This function puts a javscript function in the edit component dialog box that handles the component id change. whenever the component id changes we add this new id into the list of options for the field it is associated to in a database.



Tags:

access:  public


[ Top ]

method printLinkToDatabaseFieldUi [line 297]

void printLinkToDatabaseFieldUi( )

Prints the UI for linking a component to a database field

This is only relevant for some of the input components




Tags:

access:  protected


[ Top ]

method printPropertiesUi [line 148]

void printPropertiesUi( )

Outputs the User Interface for editing the components properties.

This function is overwritten by each component. It must be implemented.




Tags:

access:  public


Overridden in child classes as:

ComponentButton::printPropertiesUi()
This is the main function that creates the button component creation dialog box
ComponentCheckbox::printPropertiesUi()
Dispays properties UI
ComponentDataTable::printPropertiesUi()
This function invokes a dialog box which allows creation of SQL query for the data table and the styles used to display the information for the datatable.
ComponentDynamicOutput::printPropertiesUi()
This function invokes a dialog box which contains an instantiated object of the FCKEditor It allows to create custom HTML providing all the relevant functionality provided by the FCKEditor.
ComponentHtmlText::printPropertiesUi()
This function invokes a dialog box which contains an instantiated object of the FCKEditor It allows to create custom HTML providing all the relevant functionality provided by the FCKEditor.
ComponentImage::printPropertiesUi()
This is the main function that creates the image component creation dialog box
ComponentInputText::printPropertiesUi()
This is the main function that creates the inputText component creation dialog box
ComponentRadiobuttonGroup::printPropertiesUi()
Display the properties of the radiobutton group

[ Top ]

method printSubmitFormFunction [line 275]

void printSubmitFormFunction( )



Tags:

access:  public


[ Top ]

method rewriteLinksForEditMode [line 387]

string rewriteLinksForEditMode( string $sCode)

This function rewrites all HTML links '<a href="something">' to '<a href="something?editMode=1">'



Tags:

return:  The HTML code with links rewritten
access:  public


Parameters:

string   $sCode   The HTML code to be rewritten

[ Top ]

method setActive [line 93]

void setActive( )

Makes this component active



Tags:

access:  public


[ Top ]

method setId [line 32]

void setId( string $sId)

Sets the component's Id in the XML



Tags:

access:  public


Parameters:

string   $sId   The new component Id

[ Top ]

method setX [line 50]

void setX( int $iX)

Sets the component's X-screen coordinate in the XML



Tags:

access:  public


Parameters:

int   $iX   The new X coordinate

[ Top ]

method setY [line 68]

void setY( int $iY)

Sets the component's Y-screen coordinate in the XML



Tags:

access:  public


Parameters:

int   $iY   The new Y coordinate

[ Top ]

method setZ [line 86]

void setZ( int $iZ)

Sets the component's Z-screen coordinate in the XML



Tags:

access:  public


Parameters:

int   $iZ   The new Z coordinate

[ Top ]

method unsetActive [line 100]

void unsetActive( )

Makes this component inactive



Tags:

static:  
access:  public


[ Top ]


Documentation generated on Wed, 12 Jan 2005 17:50:48 -0500 by phpDocumentor 1.3.0RC3