protected function saveNewOrder(
        array $sortOrder,
        string $targetAttribute,
        array $sortOrderCondition = [],
        string $sortOrderAttribute = 'sortOrder'
    ): bool {
        foreach ($sortOrder as $target => $order) {
            Craft::$app->getDb()->createCommand()
                ->update(
                    static::tableName(),
                    [$sortOrderAttribute => $order],
                    array_merge(
                        $sortOrderCondition,
                        [
                            $targetAttribute => $target
                        ]
                    )
                )
                ->execute();
        }

        return true;
    }