本文整理匯總了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'));
}
示例2: events
public function events()
{
return array_merge(parent::events(), array('onAfterCreate' => 'afterCreate', 'onAfterUpdate' => 'afterUpdate'));
}
示例3: events
public function events()
{
return array_merge(parent::events(), array('onAfterFind' => 'afterFind'));
}
示例4: events
public function events()
{
return array_merge(parent::events(), array('onBeforeEmbeddedDocsInit' => 'beforeEmbeddedDocsInit', 'onAfterEmbeddedDocsInit' => 'afterEmbeddedDocsInit', 'onBeforeToArray' => 'beforeToArray', 'onAfterToArray' => 'afterToArray'));
}
示例5: events
public function events()
{
return array_merge(parent::events(), array('onBeforeFormInit' => 'beforeFormInit', 'onAfterFormInit' => 'afterFormInit', 'onBeforeGridInitColumns' => 'beforeGridInitColumns', 'onAfterGridInitColumns' => 'afterGridInitColumns', 'onBeforeGridInit' => 'beforeGridInit', 'onAfterGridInit' => 'afterGridInit'));
}
示例6: events
/**
* Extend standard AR behavior events
*
* @return array
*/
public function events()
{
return array_merge(parent::events(), array('onUnsafeAttribute' => 'unsafeAttribute'));
}
示例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'));
}
示例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'));
}