Public Member Functions | Public Attributes | Protected Member Functions

BEAppObjectModel Class Reference

BEdita base app object class. More...

Inheritance diagram for BEAppObjectModel:
BEAppModel AppModel BeditaAnnotationModel BeditaCollectionModel BeditaContentModel BeditaProductModel BeditaSimpleObjectModel BeditaSimpleStreamModel BeditaStreamModel Card Link

List of all members.

Public Member Functions

 field ($name, $conditions=null, $order=null)
 Overrides field, don't use CompactResult in field().
 saveField ($name, $value, $validate=false)
 Overrides saveField, don't use CompactResult in saveField().
 save ($data=null, $validate=true, $fieldList=array())
 cloneObject ($id, array $options=array())
 Clone a BEdita object starting from object id It should be called from a BEdita object model as Document, Section, etc...
 arrangeDataForClone (array &$data, array $options=array())
 Arrange an array to cloning a BEdita object.
 checkType ($objTypeId)
 getTypeId ()
 apiTransformer (array $options=array())
 Return an array of column types to transform (cast) for generic BEdita object type Used to build consistent REST APIs.

Public Attributes

 $recursive = 2
 $actsAs
 $hasOne
 $objectTypesGroups = array()

Protected Member Functions

 updateHasManyAssoc ()
 Updates hasMany model rows: * delete all rows of hasMany models except ones with "id" set in $data array * saves/updates all hasMany data rows from $data array.
 validateContent ()
 default values for Contents

Detailed Description

BEdita base app object class.

BEdita objects should extend BEAppObjectModel

Definition at line 835 of file app_model.php.


Member Function Documentation

BEAppObjectModel::apiTransformer ( array $  options = array()  ) 

Return an array of column types to transform (cast) for generic BEdita object type Used to build consistent REST APIs.

In general it returns all castable fields from:

  • main Model table
  • tables that extend the object (ForeignDependenceSave)
  • GetTag, Category, Tag

Possible options are:

  • 'castable' an array of fields that the REST APIs should cast to
Parameters:
array $options
Returns:
array

Reimplemented in Section, and Event.

Definition at line 1105 of file app_model.php.

BEAppObjectModel::arrangeDataForClone ( array &$  data,
array $  options = array() 
)

Arrange an array to cloning a BEdita object.

Parameters:
array $data, should come from a find
array $options, default values are: "nicknameSuffix" => "", suffix to append at the original object nickname "keepTitle" => false, true to keep the original object title "keepUserCreated" => false, true to keep the original user created

Definition at line 960 of file app_model.php.

Referenced by cloneObject().

BEAppObjectModel::cloneObject ( id,
array $  options = array() 
)

Clone a BEdita object starting from object id It should be called from a BEdita object model as Document, Section, etc...

Parameters:
int $id, the BEdita object id
array $options, see BEAppObjectModel::arrangeDataForClone
Returns:
type

Definition at line 943 of file app_model.php.

References arrangeDataForClone().

BEAppObjectModel::field ( name,
conditions = null,
order = null 
)

Overrides field, don't use CompactResult in field().

Parameters:
string $name
array $conditions
string $order

Definition at line 867 of file app_model.php.

Referenced by Card::importCSVFile().

BEAppObjectModel::saveField ( name,
value,
validate = false 
)

Overrides saveField, don't use CompactResult in saveField().

Parameters:
string $name
array $conditions
string $order

Definition at line 887 of file app_model.php.

Referenced by Image::setImageDimArray().

BEAppObjectModel::updateHasManyAssoc (  )  [protected]

Updates hasMany model rows: * delete all rows of hasMany models except ones with "id" set in $data array * saves/updates all hasMany data rows from $data array.

Exceptions:
BeditaException 
Returns:
boolean

Definition at line 1032 of file app_model.php.


Member Data Documentation

BEAppObjectModel::$actsAs
Initial value:
 array(
        'Callback',
        'CompactResult' => array(),
        'SearchTextSave',
        'RevisionObject',
        'ForeignDependenceSave' => array('BEObject'),
        'DeleteObject' => 'objects',
        'Notify'
    )

Reimplemented from BEAppModel.

Definition at line 838 of file app_model.php.

BEAppObjectModel::$hasOne
Initial value:
 array(
            'BEObject' =>
            array(
                'className'     => 'BEObject',
                'conditions'   => '',
                'foreignKey'    => 'id',
                'dependent'     => true
            )
        )

Definition at line 848 of file app_model.php.


The documentation for this class was generated from the following file:
Generated on Fri Dec 11 2015 15:29:46 by Doxygen 1.7.1  BEditaBEdita 3.7 Corylus