public function actionRegenerateSlugs()
    {
        $this->elements = (new Query())
            ->select(['id', 'parent_id'])
            ->from(BaseStructure::tableName())
            ->orderBy(['parent_id' => SORT_ASC])
            ->indexBy('id')
            ->all();

        foreach ($this->elements as &$element) {
            if ((int)$element['parent_id'] === 0) {
                $this->setTreeUrl($element);
            }
        }
    }