Xataface 2.0
Xataface Application Framework
Public Member Functions | Data Fields
Dataface_ExistingRelatedRecordForm Class Reference

Public Member Functions

 Dataface_ExistingRelatedRecordForm (&$record, $relationshipName, $db='')
 formSubmitted ()
getRecord ()
 _build ()
 display ()
 save ($values)

Data Fields

 $_parentTable
 $_relationship
 $_relationshipName
 $_quickForm
 $_built
 $_db
 $_record
 $_relatedRecord

Detailed Description

File: Dataface/ExistingRelatedRecordForm.php Author: Steve Hannah <shannah@sfu.ca> Created: November 2005

Description: ------------ A form to add existing records to a relationship. It provides a select list of existing records in the relationship domain, along with extra fields necessary to make the relationship.

Definition at line 39 of file ExistingRelatedRecordForm.php.


Member Function Documentation

_build ( )

Builds the form.

Definition at line 158 of file ExistingRelatedRecordForm.php.

Dataface_ExistingRelatedRecordForm ( &$  record,
relationshipName,
db = '' 
)

Constructor.

Parameters:
recordThe parent record Dataface_Record If this parameter is null or left blank, then the appropriate parent record will be automatically loaded based on the POST and GET parameters.
relationshipNameThe name of the relationship. string
dbThe database resource handle.

Definition at line 96 of file ExistingRelatedRecordForm.php.

display ( )

Displays the form as html.

Definition at line 323 of file ExistingRelatedRecordForm.php.

formSubmitted ( )

This can even be called in static context (which makes it callable in the constructor as a means to load the current record.

Returns:
boolean True if the form has been submitted, false otherwise.

Definition at line 124 of file ExistingRelatedRecordForm.php.

& getRecord ( )

Loads the parent record based on POST and GET parameters.

Definition at line 132 of file ExistingRelatedRecordForm.php.

save ( values)

Saves the record. Ie: creates the necessary join table records to add the desired record to the relationship.

Definition at line 333 of file ExistingRelatedRecordForm.php.


Field Documentation

$_built

Flag to indicate if the form is built yet. boolean

Definition at line 65 of file ExistingRelatedRecordForm.php.

$_db

Database resource handle.

Definition at line 70 of file ExistingRelatedRecordForm.php.

$_parentTable

Reference to the parent table of the relationship. Dataface_Table

Definition at line 45 of file ExistingRelatedRecordForm.php.

$_quickForm

Definition at line 59 of file ExistingRelatedRecordForm.php.

$_record

Reference to parent record. Dataface_Record

Definition at line 76 of file ExistingRelatedRecordForm.php.

$_relatedRecord

Reference to related record that is being added. Dataface_RelatedRecord

Definition at line 82 of file ExistingRelatedRecordForm.php.

$_relationship

Reference to the relationship. Dataface_Relationship

Definition at line 51 of file ExistingRelatedRecordForm.php.

$_relationshipName

Name of the relationship. string

Definition at line 57 of file ExistingRelatedRecordForm.php.


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Enumerations