本文整理匯總了PHP中Audit::model方法的典型用法代碼示例。如果您正苦於以下問題:PHP Audit::model方法的具體用法?PHP Audit::model怎麽用?PHP Audit::model使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Audit
的用法示例。
在下文中一共展示了Audit::model方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: cleanUpTestUser
protected function cleanUpTestUser()
{
if (!$this->user) {
$this->user = User::model()->findByAttributes(array('username' => 'autotestapi'));
if (!$this->user) {
return;
}
}
// clear out all the data we've touched, and the user
foreach (array_merge(array('Audit', 'OEModule\\PASAPI\\models\\PasApiAssignment', 'Patient', 'Address', 'Contact'), $this->additional_clean_up_models) as $cls) {
$cls::model()->deleteAllByAttributes(array('created_user_id' => $this->user->id));
}
Audit::model()->deleteAllByAttributes(array('user_id' => $this->user->id));
$this->user->saveRoles(array());
$this->user->delete();
}
示例2: actionUpdateList
public function actionUpdateList()
{
if (!($audit = Audit::model()->findByPk(@$_GET['last_id']))) {
throw new Exception('Log entry not found: ' . @$_GET['last_id']);
}
$this->renderPartial('_list_update', array('data' => $this->getData(null, $audit->id)), false, true);
}
示例3: testModel
/**
* @covers Audit::model
*/
public function testModel()
{
$this->assertEquals('Audit', get_class(Audit::model()), 'Class name should match model.');
}