本文整理汇总了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'));
}