Class P4A_Mask

Description

The mask is the basic interface object wich contains all widgets and generically every displayed object.

Located in /p4a/objects/mask.php (line 41)

P4A_Object
   |
   --P4A_Mask
Direct descendents
Class Description
 class P4A_Error_Mask General errors mask.
 class P4A_Preview_Mask
 class P4A_Login_Mask
 class P4A_Base_Mask
Variable Summary
Method Summary
 static P4A_Mask singleton (string $name)
 P4A_Mask __construct ([string $name = null])
 P4A_Mask addTempVar (string $name, string $value)
 P4A_Mask display (string $variable,  &$object, mixed $object)
 P4A_Mask displayText (string $variable, string $text)
 P4A_Mask dropTempVar (string $name)
 P4A_Mask error (string $message)
 string getAsString ([string $_template = false])
 string getFocusedObjectId ()
 string getIcon ()
 integer getIconSize ()
 string getTemplateName ()
 string getTitle ()
 P4A_Mask info (string $message)
 boolean isPopup ([boolean|null $is_popup = null])
 void loadRow ([integer $num_row = null])
 void main ()
 string maskClose ()
 string maskOpen ()
 void none ()
 void reloadRow ()
 boolean saveRow ()
 P4A_Mask setFocus ([P4A_Object $object = null])
 P4A_Mask setIcon (string $icon)
 P4A_Mask setIconSize (integer $size)
 P4A_Mask setRequiredField ( $field, string|P4A_Field $field_name)
 P4A_Mask setTitle (string $title)
 void showPrevMask ()
 P4A_Mask useTemplate (string|false $template_name)
 boolean validateFields ()
 P4A_Mask warning (string $message)
Variables
P4A_Button $close_popup_button = null (line 115)
  • access: public
P4A_Data_Source $data = null (line 47)

The mask's data source

  • access: private
array $external_fields = array() (line 59)

Store the external fields' object_id

  • access: private
P4A_Collection $fields = null (line 53)

The fields collection

  • access: public
string $focus_object_id = null (line 76)

The id of the object with active focus

  • access: private
boolean $is_popup = false (line 100)
  • access: private
array $map_actions = array() (line 65)

Keeps the association between actions events and actions.

  • access: private
string $template_name = null (line 82)

Currently used template name

  • access: private
string $title = null (line 70)
  • access: private
string $_icon = null (line 105)
  • access: private
integer $_icon_size = 32 (line 110)
  • access: private
array $_temp_vars = array() (line 89)

Temporary variables container.

These vars are usally in the templates, removed after main.

  • access: private
array $_tpl_vars = array() (line 95)

variables used for templates

  • access: private

Inherited Variables

Inherited from P4A_Object

P4A_Object::$_helpers
P4A_Object::$_id
P4A_Object::$_map_actions
P4A_Object::$_name
P4A_Object::$_objects
P4A_Object::$_parent_id
Methods
static singleton (line 143)
  • access: public
P4A_Mask singleton (string $name)
  • string $name
Constructor __construct (line 120)
  • access: public
P4A_Mask __construct ([string $name = null])
  • string $name: Object name (identifier)

Redefinition of:
P4A_Object::__construct()

Redefined in descendants as:
addTempVar (line 511)

Add a temporary variable

  • access: public
P4A_Mask addTempVar (string $name, string $value)
  • string $name
  • string $value
clearTemplateVars (line 346)

Removes every template variable assigned

  • access: public
P4A_Mask clearTemplateVars ()
clearTempVars (line 534)

Clear temporary vars list

  • access: public
P4A_Mask clearTempVars ()
deleteRow (line 423)

Deletes the currently pointed record

  • access: public
P4A_Mask deleteRow ()
display (line 246)

Tells the template engine to show an object as a variable.

$object will be shown in the $variable template zone.

  • access: public
P4A_Mask display (string $variable,  &$object, mixed $object)
  • string $variable: Variable name, stands for a template zone
  • mixed $object: Widget or string, the value of the assignment
  • &$object
displayText (line 258)

Tells the template engine to show a strng as a variable

  • access: public
P4A_Mask displayText (string $variable, string $text)
  • string $variable: Variable name, stands for a template variable
  • string $text: String, the value of the assignment
dropTempVar (line 522)

Drop a temporary variable

  • access: public
P4A_Mask dropTempVar (string $name)
  • string $name
error (line 661)

Prints out an error message (with an error icon).

It's a wrapper for P4A::message()

  • access: public
P4A_Mask error (string $message)
  • string $message
firstRow (line 463)

Moves to the first row

  • access: public
P4A_Mask firstRow ()
getAsString (line 300)

Renders the mask as HTML code and returns it

  • access: public
string getAsString ([string $_template = false])
  • string $_template
getFocusedObjectId (line 579)
  • access: public
string getFocusedObjectId ()
getIcon (line 553)
  • access: public
string getIcon ()
getIconSize (line 571)
  • access: public
integer getIconSize ()
getPrevMask (line 205)

Get the previous mask

  • access: public
P4A_Mask getPrevMask ()
getTemplateName (line 231)

Returns the currently used template name

  • access: public
string getTemplateName ()
getTitle (line 279)

Returns the title for the mask

  • access: public
string getTitle ()
info (line 673)

Prints out an info message (with an info icon).

It's a wrapper for P4A::message()

  • access: public
P4A_Mask info (string $message)
  • string $message
isPopup (line 159)

gets/sets popup state

  • access: public
boolean isPopup ([boolean|null $is_popup = null])
  • boolean|null $is_popup
lastRow (line 453)

Moves to the last row

  • access: public
P4A_Mask lastRow ()
loadRow (line 376)

Loads the current record data

  • access: public
void loadRow ([integer $num_row = null])
  • integer $num_row: The wanted row number
main (line 287)

Prints out the mask

  • access: public
void main ()

Redefined in descendants as:
maskClose (line 493)

Returns the closing code for the mask

  • access: protected
string maskClose ()
maskOpen (line 473)

Returns the opening code for the mask

  • access: protected
string maskOpen ()
newRow (line 413)

Goes in "new row" modality.

This means that we prepare p4a for adding a new record to the data source wich is associated to the mask.

  • access: public
P4A_Mask newRow ()
nextRow (line 433)

Moves to the next row

  • access: public
P4A_Mask nextRow ()
none (line 501)

Does nothing

  • access: public
void none ()
prevRow (line 443)

Moves to the previous row

  • access: public
P4A_Mask prevRow ()
reloadRow (line 384)

Reloads data for the current record

  • access: public
void reloadRow ()
saveRow (line 398)

Validate all fields and saves row to the data source

  • access: public
boolean saveRow ()
setFocus (line 172)

Sets the focus on object

  • access: public
P4A_Mask setFocus ([P4A_Object $object = null])
setIcon (line 544)
  • access: public
P4A_Mask setIcon (string $icon)
  • string $icon
setIconSize (line 562)
  • access: public
P4A_Mask setIconSize (integer $size)
  • integer $size
setRequiredField (line 590)

Adds the "not empty" validator to the passed field

  • access: public
P4A_Mask setRequiredField ( $field, string|P4A_Field $field_name)
setSource (line 359)

Associates a data source with the mask.

Also set the data structure to allow correct widget rendering. Also moves to the first row of the data source.

  • return: the fields collection
  • access: public
P4A_Collection setSource (P4A_Data_Source $data_source)
setTitle (line 269)

Sets the title for the mask

  • access: public
P4A_Mask setTitle (string $title)
  • string $title
showPrevMask (line 196)

Shows the previous mask

  • access: public
void showPrevMask ()
unsetFocus (line 187)

Removes focus property

  • deprecated:
  • access: public
P4A_Mask unsetFocus ()
unsetRequiredField (line 609)

Removes the "not empty" validator from the passed field

  • access: public
P4A_Mask unsetRequiredField (string|P4A_Field $field)
useTemplate (line 215)

Tells the mask that we're going to use a template

  • access: public
P4A_Mask useTemplate (string|false $template_name)
  • string|false $template_name: "template name" stands for "template name.tpl" in the "CURRENT THEME\masks\" directory. If false removes template.
validateFields (line 627)

Calls the isValid() method for every field.

If a field does not pass validation sets its error message.

  • access: public
boolean validateFields ()
warning (line 649)

Prints out a warning message (with a warning icon).

It's a wrapper for P4A::message()

  • access: public
P4A_Mask warning (string $message)
  • string $message

Inherited Methods

Inherited From P4A_Object

 P4A_Object::__construct()
 P4A_Object::actionHandler()
 P4A_Object::build()
 P4A_Object::destroy()
 P4A_Object::dropImplement()
 P4A_Object::dropMethod()
 P4A_Object::errorHandler()
 P4A_Object::getId()
 P4A_Object::getName()
 P4A_Object::getObjectType()
 P4A_Object::getParentID()
 P4A_Object::implement()
 P4A_Object::intercept()
 P4A_Object::isActionTriggered()
 P4A_Object::setName()
 P4A_Object::setParentID()
 P4A_Object::void()
 P4A_Object::_loadHelper()
 P4A_Object::__call()

Documentation generated on Tue, 02 Sep 2008 10:04:02 +0200 by phpDocumentor 1.4.2