BEAppModel Class Reference

Bedita model base class. More...

Inheritance diagram for BEAppModel:

AppModel Alias Annotation Answer BannedIp BEAppObjectModel BEObject Category Content DateItem EventLog GeoTag Group HashJob LangText MailGroup MailGroupCard MailJob MailLog Module ObjectProperty ObjectRelation ObjectType ObjectUser Permission PermissionModule Product Property PropertyOption QuestionAnswer SearchText SectionDummy Stream Tree User Version ViewPermission

List of all members.

Public Member Functions

 am ($record)
 Merge record result in one array.
 getDefaultDateFormat ($value=null)
 Get SQL date format.
 toolbar ($page=null, $dimPage=null, $size=0)
 Object search Toolbar.
 containLevel ($level="minimum")
 findObjects ($id=null, $userid=null, $status=null, $filter=array(), $order=null, $dir=true, $page=1, $dim=100000, $all=false, $excludeIds=array())
 perform an objects search

Protected Member Functions

 checkDate ($key)
 Check date field in $this->data[ModelName][$key] -> set to null if empty or call getDefaultDateFormat.
 checkFloat ($key)
 Check float/double field in $this->data[ModelName][$key] -> set to null if empty.
 checkNumber ($key)
 Check integer/generic number in $this->data[ModelName][$key] -> set to null if empty.
 checkDuration ($key)
 getLimitClausole ($page=1, $dim=100000)
 SQL limit clausole.

Protected Attributes

 $modelBindings = array()


Detailed Description

Bedita model base class.

Definition at line 40 of file app_model.php.


Member Function Documentation

BEAppModel.am ( record  ) 

Merge record result in one array.

Parameters:
array record record data
Returns:
array record merged to single array

Definition at line 50 of file app_model.php.

Referenced by BEAppObjectModel.__clone(), and findObjects().

BEAppModel.getDefaultDateFormat ( value = null  ) 

Get SQL date format.

Parameters:
unknown_type $value
Returns:
unknown

Definition at line 66 of file app_model.php.

Referenced by BEObject.beforeValidate(), and checkDate().

BEAppModel.checkDate ( key  )  [protected]

Check date field in $this->data[ModelName][$key] -> set to null if empty or call getDefaultDateFormat.

Parameters:
string $key

Definition at line 86 of file app_model.php.

References getDefaultDateFormat().

Referenced by BEAppObjectModel.validateContent().

BEAppModel.checkFloat ( key  )  [protected]

Check float/double field in $this->data[ModelName][$key] -> set to null if empty.

Parameters:
string $key

Definition at line 100 of file app_model.php.

BEAppModel.checkNumber ( key  )  [protected]

Check integer/generic number in $this->data[ModelName][$key] -> set to null if empty.

Parameters:
string $key

Definition at line 112 of file app_model.php.

BEAppModel.toolbar ( page = null,
dimPage = null,
size = 0 
)

Object search Toolbar.

Parameters:
integer $page
integer $dimPage
mixed $sqlCondition sql search condition
boolean $recursive TRUE, retrieve connected objects
mixed $sqlCondition sql search condition
Returns:
array

Definition at line 138 of file app_model.php.

Referenced by findObjects().

BEAppModel.getLimitClausole ( page = 1,
dim = 100000 
) [protected]

SQL limit clausole.

Parameters:
int $page, page num
int $dim, global size/count
Returns:
string

Definition at line 192 of file app_model.php.

Referenced by findObjects().

BEAppModel.findObjects ( id = null,
userid = null,
status = null,
filter = array(),
order = null,
dir = true,
page = 1,
dim = 100000,
all = false,
excludeIds = array() 
)

perform an objects search

Parameters:
integer $id root id, if it's set perform search on the tree
string $userid user: null (default) => no permission check. ' ' => guest/anonymous user,
string $status object status
array $filter example of filter: "object_type_id" => array(21,22,...), "ModelName.fieldname => "value", "query" => "text to search" ....
reserved filter words: "category" => "val" search by category id or category name "relation" => "val" search by object_relations swicth "rel_object_id" => "val" search object relateds to a particular object (object_relation object_id) ... see all in BuildFilter behavior

Parameters:
string $order field to order result (id, status, modified..)
boolean $dir true (default), ascending, otherwiese descending.
integer $page Page number (for pagination)
integer $dim Page dim (for pagination)
boolean $all true: all tree levels (discendents), false: only first level (children)
array $excludeIds Array of id's to exclude

Definition at line 230 of file app_model.php.

References am(), getLimitClausole(), and toolbar().

Referenced by Tree.getAll(), Tree.getChildren(), and Tree.getDescendants().


The documentation for this class was generated from the following file:

Generated on Tue Jan 12 15:45:35 2010  BEditaBEdita 3.0.1 betula