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

Public Member Functions

 Dataface_RemoveRelatedRecordForm (&$record, $relationshipName, $query=null)
 formSubmitted ()
getRecord ()
 allowDeleteRecords ()
 deleteRequired ()
 _build ()
 display ()
getSelectedRecords ()
getDomainTable ()
 delete ($values)

Data Fields

 $_record
 $_relationshipName
 $_relationship
 $_isBuilt = false
 $query
 $records
 $_domainTable
 $allowDelete

Detailed Description

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

Description: -------------

An HTML form to remove a set of records from a relationship. It also has an option to remove the records from the database.

Definition at line 40 of file RemoveRelatedRecordForm.php.


Member Function Documentation

_build ( )

Builds the form.

Definition at line 190 of file RemoveRelatedRecordForm.php.

allowDeleteRecords ( )

Definition at line 156 of file RemoveRelatedRecordForm.php.

Dataface_RemoveRelatedRecordForm ( &$  record,
relationshipName,
query = null 
)

Constructor

Parameters:
recordReference to record object. If left null or blank, the proper record will be loaded using GET and POST parameters. Dataface_Record
relationshipNameThe name of the relationship from which records will be removed.
arrayof urlencoded strings of the form key1=value1&key2=value2& ... etc.. where keyi is the ith key in the related record.

Definition at line 107 of file RemoveRelatedRecordForm.php.

delete ( values)

Deletes the appropriate records from the join table and the domain table (if requested).

Definition at line 299 of file RemoveRelatedRecordForm.php.

deleteRequired ( )

Indicates whether this removal *REQUIRES* a delete to occur. For one to many relationships, deletion is required. For many-to-many relationships, deletion is not required.

Definition at line 181 of file RemoveRelatedRecordForm.php.

display ( )

Displays the form.

Definition at line 236 of file RemoveRelatedRecordForm.php.

formSubmitted ( )

Indicates whether or not form can be submitted. This can be called in static context also which makes it usable in the constructor.

Returns:
boolean True if form has been submitted. False otherwise.

Definition at line 137 of file RemoveRelatedRecordForm.php.

& getDomainTable ( )

Returns a reference to the Dataface_Table object encapsulating the domain table for this relationship.

Returns:
Dataface_Table The domain table.

Definition at line 279 of file RemoveRelatedRecordForm.php.

& getRecord ( )

Loads and returns the Dataface_Record object that is specified by the current POST and GET variables. This may be called in static context which makes it useful in the constructor.

Returns:
Dataface_Record object

Definition at line 149 of file RemoveRelatedRecordForm.php.

& getSelectedRecords ( )

Returns an array of the selected records.

Definition at line 269 of file RemoveRelatedRecordForm.php.


Field Documentation

$_domainTable

Definition at line 86 of file RemoveRelatedRecordForm.php.

$_isBuilt = false

Definition at line 70 of file RemoveRelatedRecordForm.php.

$_record

Definition at line 46 of file RemoveRelatedRecordForm.php.

$_relationship

Definition at line 58 of file RemoveRelatedRecordForm.php.

$_relationshipName

Definition at line 52 of file RemoveRelatedRecordForm.php.

$allowDelete

Definition at line 95 of file RemoveRelatedRecordForm.php.

$query

Definition at line 72 of file RemoveRelatedRecordForm.php.

$records

Definition at line 79 of file RemoveRelatedRecordForm.php.


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