當前位置: 首頁>>代碼示例>>PHP>>正文


PHP CActiveRecordBehavior::events方法代碼示例

本文整理匯總了PHP中CActiveRecordBehavior::events方法的典型用法代碼示例。如果您正苦於以下問題:PHP CActiveRecordBehavior::events方法的具體用法?PHP CActiveRecordBehavior::events怎麽用?PHP CActiveRecordBehavior::events使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在CActiveRecordBehavior的用法示例。


在下文中一共展示了CActiveRecordBehavior::events方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: events

 public function events()
 {
     if (is_subclass_of($this->getOwner(), 'BaseMongoDocument')) {
         $tmp = parent::events();
     } else {
         $tmp = array();
     }
     return array_merge($tmp, array('onBeforeEmbeddedDocsInit' => 'beforeEmbeddedDocsInit', 'onAfterEmbeddedDocsInit' => 'afterEmbeddedDocsInit', 'onBeforeToArray' => 'beforeToArray', 'onAfterToArray' => 'afterToArray'));
 }
開發者ID:vangogogo,項目名稱:justsns,代碼行數:9,代碼來源:BaseMongoDocumentBehavior.php

示例2: events

 public function events()
 {
     return array_merge(parent::events(), array('onAfterCreate' => 'afterCreate', 'onAfterUpdate' => 'afterUpdate'));
 }
開發者ID:dsyman2,項目名稱:X2CRM,代碼行數:4,代碼來源:X2ChangeLogBehavior.php

示例3: events

 public function events()
 {
     return array_merge(parent::events(), array('onAfterFind' => 'afterFind'));
 }
開發者ID:tymiles003,項目名稱:X2CRM,代碼行數:4,代碼來源:ContactsNameBehavior.php

示例4: events

 public function events()
 {
     return array_merge(parent::events(), array('onBeforeEmbeddedDocsInit' => 'beforeEmbeddedDocsInit', 'onAfterEmbeddedDocsInit' => 'afterEmbeddedDocsInit', 'onBeforeToArray' => 'beforeToArray', 'onAfterToArray' => 'afterToArray'));
 }
開發者ID:niranjan2m,項目名稱:Voyanga,代碼行數:4,代碼來源:EMongoDocumentBehavior.php

示例5: events

 public function events()
 {
     return array_merge(parent::events(), array('onBeforeFormInit' => 'beforeFormInit', 'onAfterFormInit' => 'afterFormInit', 'onBeforeGridInitColumns' => 'beforeGridInitColumns', 'onAfterGridInitColumns' => 'afterGridInitColumns', 'onBeforeGridInit' => 'beforeGridInit', 'onAfterGridInit' => 'afterGridInit'));
 }
開發者ID:blindest,項目名稱:Yii-CMS-2.0,代碼行數:4,代碼來源:ActiveRecordBehavior.php

示例6: events

 /**
  * Extend standard AR behavior events
  *
  * @return array
  */
 public function events()
 {
     return array_merge(parent::events(), array('onUnsafeAttribute' => 'unsafeAttribute'));
 }
開發者ID:nov072008,項目名稱:yiitesting,代碼行數:9,代碼來源:WFormBehavior.php

示例7: events

 /**
  * Declares events and the corresponding event handler methods.
  * 
  * @return array handled events
  *
  * @see CBehavior::events
  */
 public function events()
 {
     return CMap::mergeArray(parent::events(), array('onBeforePublish' => 'beforePublish', 'onAfterPublish' => 'afterPublish', 'onBeforeUnpublish' => 'beforeUnpublish', 'onAfterUnpublish' => 'afterUnpublish', 'onBeforeRevert' => 'beforeRevert', 'onAfterRevert' => 'afterRevert', 'onAfterCreateRevision' => 'afterCreateRevision'));
 }
開發者ID:hansenmakangiras,項目名稱:disperindag,代碼行數:11,代碼來源:SandboxChildBehavior.php

示例8: events

 /**
  * Declares events and the event handler methods
  * @return array
  */
 public function events()
 {
     return array_merge(parent::events(), array('onBeforeSave' => 'serializeAttributes', 'onAfterSave' => 'unserializeAttributes', 'onAfterFind' => 'unserializeAttributes'));
 }
開發者ID:sundgaarden,項目名稱:dashboard,代碼行數:8,代碼來源:SerializeBehavior.php


注:本文中的CActiveRecordBehavior::events方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。