Skip to content

Instantly share code, notes, and snippets.

protected function beforeDelete()
{
if (method_exists($this->relation, 'beforeCommentDelete')) {
$this->onBeforeDelete = array($this->relation, 'beforeCommentDelete');
}
return parent::beforeDelete();
}
protected function afterDelete()
namespace common\components;
use \yii\web\UrlManager as BaseUrlManager;
class UrlManager extends BaseUrlManager {
protected $choice;
public function init() {
if ($this->choice === null) {
namespace common\models;
use Yii;
use yii\base\NotSupportedException;
use yii\behaviors\TimestampBehavior;
use yii\db\ActiveRecord;
use yii\web\IdentityInterface;
/**
* User model