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
  • Net
  • None
  • PHP
  • system
    • base
    • caching
      • dependencies
    • collections
    • console
    • db
      • ar
      • schema
        • cubrid
        • mssql
        • mysql
        • oci
        • pgsql
        • sqlite
    • i18n
      • gettext
    • logging
    • test
    • utils
    • validators
    • web
      • actions
      • auth
      • filters
      • form
      • helpers
      • renderers
      • services
      • widgets
        • captcha
        • pagers
  • Text
    • Highlighter
  • zii
    • behaviors
    • widgets
      • grid
      • jui

Classes

  • BaseDocsMassAction
  • CApplication
  • CApplicationComponent
  • CBehavior
  • CComponent
  • CEnumerable
  • CErrorEvent
  • CErrorHandler
  • CEvent
  • CExceptionEvent
  • CModel
  • CModelBehavior
  • CModelEvent
  • CModule
  • CommonFieldsBehavior
  • CSecurityManager
  • CStatePersister
  • Expression
  • MassAction
  • MassAddToList
  • MassCompleteAction
  • MassMoveFileSysObjToFolder
  • MassRemoveFromList
  • MassRenameFileSysObj
  • MassUncompleteAction
  • MobileRecentItems
  • ModulePanelItem
  • NewListFromSelection
  • PanelItem
  • QuickCRUDBehavior
  • RecentItemPanelItem
  • ServiceRoutingBehavior
  • SettingsPanelItem
  • X2AddressBehavior
  • X2AuthCache
  • X2BaseListViewBehavior

Interfaces

  • IAction
  • IApplicationComponent
  • IAuthManager
  • IBehavior
  • IFilter
  • IStatePersister
  • IUserIdentity
  • IViewRenderer
  • IWebServiceProvider
  • IWebUser

Exceptions

  • CException
  • CHttpException
  • TwitterFeedWidgetException
  • Overview
  • Package
  • Class
  • Tree
 1: <?php
 2: /**
 3:  * CModelBehavior class file.
 4:  *
 5:  * @author Qiang Xue <qiang.xue@gmail.com>
 6:  * @link http://www.yiiframework.com/
 7:  * @copyright 2008-2013 Yii Software LLC
 8:  * @license http://www.yiiframework.com/license/
 9:  */
10: 
11: /**
12:  * CModelBehavior is a base class for behaviors that are attached to a model component.
13:  * The model should extend from {@link CModel} or its child classes.
14:  *
15:  * @property CModel $owner The owner model that this behavior is attached to.
16:  *
17:  * @author Qiang Xue <qiang.xue@gmail.com>
18:  * @package system.base
19:  */
20: class CModelBehavior extends CBehavior
21: {
22:     /**
23:      * Declares events and the corresponding event handler methods.
24:      * The default implementation returns 'onAfterConstruct', 'onBeforeValidate' and 'onAfterValidate' events and handlers.
25:      * If you override this method, make sure you merge the parent result to the return value.
26:      * @return array events (array keys) and the corresponding event handler methods (array values).
27:      * @see CBehavior::events
28:      */
29:     public function events()
30:     {
31:         return array(
32:             'onAfterConstruct'=>'afterConstruct',
33:             'onBeforeValidate'=>'beforeValidate',
34:             'onAfterValidate'=>'afterValidate',
35:         );
36:     }
37: 
38:     /**
39:      * Responds to {@link CModel::onAfterConstruct} event.
40:      * Override this method and make it public if you want to handle the corresponding event
41:      * of the {@link CBehavior::owner owner}.
42:      * @param CEvent $event event parameter
43:      */
44:     protected function afterConstruct($event)
45:     {
46:     }
47: 
48:     /**
49:      * Responds to {@link CModel::onBeforeValidate} event.
50:      * Override this method and make it public if you want to handle the corresponding event
51:      * of the {@link owner}.
52:      * You may set {@link CModelEvent::isValid} to be false to quit the validation process.
53:      * @param CModelEvent $event event parameter
54:      */
55:     protected function beforeValidate($event)
56:     {
57:     }
58: 
59:     /**
60:      * Responds to {@link CModel::onAfterValidate} event.
61:      * Override this method and make it public if you want to handle the corresponding event
62:      * of the {@link owner}.
63:      * @param CEvent $event event parameter
64:      */
65:     protected function afterValidate($event)
66:     {
67:     }
68: }
69: 
API documentation generated by ApiGen 2.8.0