OwnedCustomField Class Reference

Inheritance diagram for OwnedCustomField:
CustomField BaseCustomField RedBeanModel BeanModel ObservableComponent

Public Member Functions

 __set ($attributeName, $value)
 save ($runValidation=true, array $attributeNames=null)
 forgetOriginalAttributeValues ()

Static Public Member Functions

static getCanHaveBean ()

Data Fields

 $originalAttributeValues = array()

Detailed Description

A CustomField owned by a SecurableItem in the sense that it is included in a relation with RedBeanModel::OWNED - its lifetime is controlled by the owning model. SecurableItems are secured and auditable and so the related models that they own are secured and auditable.

Definition at line 44 of file OwnedCustomField.php.


Member Function Documentation

static getCanHaveBean (  )  [static]
See also:
RedBeanModel::getHasBean()

Reimplemented from BeanModel.

Definition at line 62 of file OwnedCustomField.php.

__set ( attributeName,
value 
)

Sets the members and relations of the model as if they were actual attributes of the model. For example, if Account extends RedBeanModel and its attributeNames() returns that one it has a member 'name' and a relation 'owner' they are simply accessed as:

   $account = new Account();
   $account->name = 'International Corp';
   $account->owner = User::getByUsername('bill');
   $account->save();
Parameters:
$attributeName A non-empty string that is the name of a member or relation of the model.
$value A value or model of the type specified as valid for the member or relation by the meta data supplied by the extending class's getMetadata() method.

Reimplemented from BaseCustomField.

Definition at line 71 of file OwnedCustomField.php.

save ( runValidation = true,
array $  attributeNames = null 
)

Saves the model to the database. Models are only saved if they have been modified and related models are saved before this model. If a related model is modified and needs saving the deems the model to be modified and need saving, which ensures that keys are updated. Cyclic relationships are prevented from causing problems by the save only proceeding to non-saved models.

Reimplemented from RedBeanModel.

Definition at line 77 of file OwnedCustomField.php.


The documentation for this class was generated from the following file:
 All Data Structures Functions Variables
Generated on Sat Jun 24 07:10:27 2017