Class JSONEmbeddedModel
A model class for dealing with "embedded" models, whose attributes are stored
in a database column as a JSON-encoded string, when using JSONEmbeddedModelFieldsBehavior
.
The methods for form inputs and rendering detail should be included in the models themselves, to keep each model self-contained.
- CComponent
- CModel implements IteratorAggregate, ArrayAccess
- JSONEmbeddedModel
Indirect known subclasses
GMailAccount, MailgunAccount, YahooEmailAccount, MailjetAccount, MandrillAccount, OutlookEmailAccount, ProfileWidgetLayout, RecordViewWidgetLayout, SendgridAccount, SESAccount, TopicsWidgetLayoutPackage: application\models\embedded
Author: Demitri Morgan <demitri@x2engine.com>
Located at x2engine/protected/models/embedded/JSONEmbeddedModel.php
public static
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
array
|
|
public
|
#
detailView( )
Child classes implementing this should override this function to generate a detail view. The resulting markup should be echoed out, not returned. |
public
|
|
public
|
#
renderInputs( )
Child classes implementing this should generate all necessary input form elements for modifying fields of the embedded model. The resulting markup should be echoed out, not returned. |
public
|
#
resolveName( string $attribute )
Generate form input name for an attribute so that the urlencoded post data
comes in a form that can be properly interpreted by setAttributes in the
container model |
public
|
#
htmlOptions( type $name, mixed $options = array() )
Generate a list of options to send to methods within CHtml that take HTML element options/properties, so that it includes the proper name of the input. |
addError(),
addErrors(),
afterConstruct(),
afterValidate(),
attributeLabels(),
beforeValidate(),
behaviors(),
clearErrors(),
createValidators(),
generateAttributeLabel(),
getAttributeLabel(),
getAttributes(),
getError(),
getErrors(),
getIterator(),
getSafeAttributeNames(),
getScenario(),
getValidatorList(),
getValidators(),
hasErrors(),
isAttributeRequired(),
isAttributeSafe(),
offsetExists(),
offsetGet(),
offsetSet(),
offsetUnset(),
onAfterConstruct(),
onAfterValidate(),
onBeforeValidate(),
onUnsafeAttribute(),
rules(),
setScenario(),
unsetAttributes(),
validate()
|
__call(),
__get(),
__isset(),
__set(),
__unset(),
asa(),
attachBehavior(),
attachBehaviors(),
attachEventHandler(),
canGetProperty(),
canSetProperty(),
detachBehavior(),
detachBehaviors(),
detachEventHandler(),
disableBehavior(),
disableBehaviors(),
enableBehavior(),
enableBehaviors(),
evaluateExpression(),
getEventHandlers(),
hasEvent(),
hasEventHandler(),
hasProperty(),
raiseEvent()
|
public
boolean
|
$requiresAdmin | false |
#
Whether or not admin rights are required to access this model |
protected
type
|
$_attributeNames |
|
#
Stores derived value returned by |
public
type
|
$exoAttr |
|
#
Name of the attribute in the containing model that contains this model |
public
type
|
$exoFormName |
|
#
Form field name prefix |
public
CActiveRecord
|
$exoModel |
|
#
The model to which this embedded model belongs |
$attributes,
$errors,
$iterator,
$safeAttributeNames,
$scenario,
$validatorList,
$validators
|