public function beforeSave($insert)
    {
        if (parent::beforeSave($insert))
        {
            if ($this->parentId > 0)
            {
                $parentNodeLevel = (int)self::find()->select('level')->where(['id' => $this->parentId])->scalar();
                $this->level = $parentNodeLevel + 1;
            }

            return TRUE;
        }
        else
        {
            return FALSE;
        }
    }