public function moveUpstairs($withCurrentElement = true)
    {
        $operator = $withCurrentElement ? '>=' : '>';
        $startIndex = $withCurrentElement ? (int) $this->sort_index : (int) $this->sort_index + 1;
        foreach (self::find()->where('sort_index '.$operator.' :index', ['index' => (int) $this->sort_index])->andWhere(['nav_container_id' => $this->nav_container_id, 'parent_nav_id' => $this->parent_nav_id])->orderBy('sort_index ASC')->asArray()->all() as $item) {
            ++$startIndex;
            Yii::$app->db->createCommand()->update(self::tableName(), ['sort_index' => $startIndex], 'id=:id', ['id' => $item['id']])->execute();
        }
    }