本文整理汇总了PHP中ModelBehavior::afterDelete方法的典型用法代码示例。如果您正苦于以下问题:PHP ModelBehavior::afterDelete方法的具体用法?PHP ModelBehavior::afterDelete怎么用?PHP ModelBehavior::afterDelete使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ModelBehavior
的用法示例。
在下文中一共展示了ModelBehavior::afterDelete方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: afterDelete
function afterDelete(\Model $model)
{
parent::afterDelete($model);
$data = array('model' => $model->alias, 'model_id' => $model->id, 'activity_type' => 'D', 'user_id' => $model->loginUser['id']);
$activity = new Activity();
$activity->save($data);
}
示例2: afterDelete
public function afterDelete(\Model $model)
{
//$this->log('after delete model');
//$this->log($model);
//$orderProductID = isset($model->id) ? $model->id : 0;
//$this->updateTotalOrder($orderProductID);
return parent::afterDelete($model);
}
示例3: afterDelete
/**
* afterDelete method
*
* @param Model $model
* @return void
*/
public function afterDelete(Model $model)
{
$settings = $this->settings[$model->alias];
if (!isset($settings['afterDelete']) || $settings['afterDelete'] === 'off') {
return parent::afterDelete($model);
}
switch ($settings['afterDelete']) {
case 'on':
echo 'afterDelete success';
break;
}
}
示例4: afterDelete
/**
* After delete is called after any delete occurs on the attached model.
*
* @param Model $model Model using this behavior
* @return void
*/
public function afterDelete(Model $model)
{
parent::afterDelete($model);
$this->writeAudit($model);
}
示例5: afterDelete
/**
* After delete is called after any delete occurs on the attached model.
* Intercepts delete to use the caching datasource instead
*
* @param Model $model Model using this behavior
* @return void
*/
public function afterDelete(Model $model)
{
if ($this->settings[$model->alias]['clearOnDelete']) {
$this->clearCache($model);
}
return parent::afterDelete($model);
}
示例6: afterDelete
/**
*
*
* @param Model $Model
*/
public function afterDelete(Model $Model)
{
parent::afterDelete($Model);
$this->logQuery($Model, 'delete');
}
示例7: afterDelete
/**
* Trigger the update of the counts of the relevant associated habtm model
* records, e.g. the Tags of the Post that was just deleted.
*
* @param AppModel $model
*/
public function afterDelete(\Model $model)
{
parent::afterDelete($model);
$this->_updateCounterCache($model);
}