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

  • ActionToRecord
  • ContactsNameBehavior
  • ERememberFiltersBehavior
  • FileSystemObjectBehavior
  • MobileLayouts
  • RecordAliases
  • RelationshipsBehavior
  • TopicReplies
  • X2ActiveRecord
  • X2Flow
  • Overview
  • Package
  • Class
  • Tree

Class RelationshipsBehavior

CActiveRecordBehavior is the base class for behaviors that can be attached to CActiveRecord. Compared with CModelBehavior, CActiveRecordBehavior attaches to more events that are only defined by CActiveRecord.

CComponent
Extended by CBehavior implements IBehavior
Extended by CModelBehavior
Extended by CActiveRecordBehavior
Extended by RelationshipsBehavior
Package: system\db\ar
Author: Qiang Xue <qiang.xue@gmail.com>
Located at x2engine/protected/components/RelationshipsBehavior.php
Methods summary
public
# getRelationships( mixed $refreshCache = false )
public
# createRelationship( mixed $target, mixed $firstLabel = null, mixed $secondLabel = null )
public
# deleteRelationship( CActiveRecord $target )
public
# getRelationship( CActiveRecord $target )
public
# getRelationshipLabel( CActiveRecord $target )
public
# getRelatedX2Models( mixed $refreshCache = false )
public
# getVisibleRelatedX2Models( mixed $refreshCache = false )
public
# afterSave( CEvent $event )

Responds to CActiveRecord::onAfterSave event. Override this method and make it public if you want to handle the corresponding event of the CBehavior::owner owner.

Responds to CActiveRecord::onAfterSave event. Override this method and make it public if you want to handle the corresponding event of the CBehavior::owner owner.

Parameters

$event
CEvent
$event event parameter

Overrides

CActiveRecordBehavior::afterSave()
public
# afterDelete( CEvent $event )

Responds to CActiveRecord::onAfterDelete event. Override this method and make it public if you want to handle the corresponding event of the CBehavior::owner owner.

Responds to CActiveRecord::onAfterDelete event. Override this method and make it public if you want to handle the corresponding event of the CBehavior::owner owner.

Parameters

$event
CEvent
$event event parameter

Overrides

CActiveRecordBehavior::afterDelete()
public
# isValidTarget( mixed $target )
public
# hasRelationship( mixed $target )
protected
# getVisibleRelationshipsCriteria( )
Methods inherited from CActiveRecordBehavior
afterFind(), beforeCount(), beforeDelete(), beforeFind(), beforeSave(), events()
Methods inherited from CModelBehavior
afterConstruct(), afterValidate(), beforeValidate()
Methods inherited from CBehavior
attach(), detach(), getEnabled(), getOwner(), setEnabled()
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 mixed $_relationships
#
protected mixed $_visibleRelatedX2Models
#
protected mixed $_relatedX2Models
#
Magic properties inherited from CActiveRecordBehavior
$owner
Magic properties inherited from CBehavior
$enabled
X2CRM Documentation API documentation generated by ApiGen 2.8.0