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);
            }
        }
    }
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);
            }
        }
    }
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 ) ; } } }
Check and regenerate compiled urls
Check and regenerate compiled urls