public function _actionBeforeDelete($e) { if ($this->cmsContents) { throw new Exception(\Yii::t('skeeks/cms', "Before you delete this type of content you want to delete the contents invested in it")); } }