Overview

Packages

  • application
    • commands
    • components
      • actions
      • filters
      • leftWidget
      • permissions
      • sortableWidget
      • util
      • webupdater
      • x2flow
        • actions
        • triggers
      • X2GridView
      • X2Settings
    • controllers
    • models
      • embedded
    • modules
      • accounts
        • controllers
        • models
      • actions
        • controllers
        • models
      • calendar
        • controllers
        • models
      • charts
        • models
      • contacts
        • controllers
        • models
      • docs
        • components
        • controllers
        • models
      • groups
        • controllers
        • models
      • marketing
        • components
        • controllers
        • models
      • media
        • controllers
        • models
      • mobile
        • components
      • opportunities
        • controllers
        • models
      • products
        • controllers
        • models
      • quotes
        • controllers
        • models
      • services
        • controllers
        • models
      • template
        • models
      • users
        • controllers
        • models
      • workflow
        • controllers
        • models
      • x2Leads
        • controllers
        • models
  • None
  • system
    • base
    • caching
    • console
    • db
      • ar
      • schema
    • validators
    • web
      • actions
      • auth
      • helpers
      • widgets
        • captcha
        • pagers
  • zii
    • widgets
      • grid

Classes

  • EmailAccount
  • EmailDropboxSettings
  • GMailAccount
  • GoogleProject
  • JSONEmbeddedModel
  • MailgunAccount
  • MailjetAccount
  • MandrillAccount
  • OutlookEmailAccount
  • SendgridAccount
  • SESAccount
  • TwitterApp
  • WidgetLayout
  • YahooEmailAccount
  • Overview
  • Package
  • Class
  • Tree

Class WidgetLayout

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
Extended by CModel implements IteratorAggregate, ArrayAccess
Extended by JSONEmbeddedModel
Extended by WidgetLayout

Direct known subclasses

ProfileWidgetLayout, RecordViewWidgetLayout, TopicsWidgetLayout
Abstract
Package: application\models\embedded
Author: Demitri Morgan <demitri@x2engine.com>
Located at x2engine/protected/models/embedded/WidgetLayout.php
Methods summary
protected
# widgetOrder( )
public array
# fields( )

Returns an array defining the expected structure of the JSON-bearing attribute

Returns an array defining the expected structure of the JSON-bearing attribute

Returns

array
public
# setAttributes( array $values, boolean $safeOnly = true )

Overridden to skip placeholder values

Overridden to skip placeholder values

Parameters

$values
array
$values attribute values (name=>value) to be set.
$safeOnly
boolean
$safeOnly whether the assignments should only be done to the safe attributes. A safe attribute is one that is associated with a validation rule in the current scenario.

Overrides

JSONEmbeddedModel::setAttributes()
public mixed
# getAttributes( array $names = null )

Normalize attribute to properties array structures defined in widget classes

Normalize attribute to properties array structures defined in widget classes

Parameters

$names
array
$names list of attributes whose value needs to be returned. Defaults to null, meaning all attributes as listed in JSONEmbeddedModel::attributeNames() will be returned. If it is an array, only the attributes in the array will be returned.

Returns

mixed
$attribute

Overrides

CModel::getAttributes()
Methods inherited from JSONEmbeddedModel
attributeNames(), detailView(), getMetaData(), getProtectedFieldPlaceholder(), getProtectedFields(), htmlOptions(), modelLabel(), renderForm(), renderInput(), renderInputs(), renderProtectedInput(), resolveName()
Methods inherited from CModel
addError(), addErrors(), afterConstruct(), afterValidate(), attributeLabels(), beforeValidate(), behaviors(), clearErrors(), createValidators(), generateAttributeLabel(), getAttributeLabel(), getError(), getErrors(), getIterator(), getSafeAttributeNames(), getScenario(), getValidatorList(), getValidators(), hasErrors(), isAttributeRequired(), isAttributeSafe(), offsetExists(), offsetGet(), offsetSet(), offsetUnset(), onAfterConstruct(), onAfterValidate(), onBeforeValidate(), onUnsafeAttribute(), rules(), setScenario(), unsetAttributes(), validate()
Methods inherited from CComponent
__call(), __get(), __isset(), __set(), __unset(), asa(), attachBehavior(), attachBehaviors(), attachEventHandler(), canGetProperty(), canSetProperty(), detachBehavior(), detachBehaviors(), detachEventHandler(), disableBehavior(), disableBehaviors(), enableBehavior(), enableBehaviors(), evaluateExpression(), getEventHandlers(), hasEvent(), hasEventHandler(), hasProperty(), raiseEvent()
Properties summary
protected string $alias
#

$alias

$alias

protected mixed $_fields
#
public mixed $whitelist
#
Properties inherited from JSONEmbeddedModel
$_attributeNames, $exoAttr, $exoFormName, $exoModel, $requiresAdmin
Magic properties inherited from CModel
$attributes, $errors, $iterator, $safeAttributeNames, $scenario, $validatorList, $validators
X2CRM Documentation API documentation generated by ApiGen 2.8.0