deleteOwnConfiguration example


    }

    private function moveSubFoldersToParent(MediaFolderEntity $folder, Context $context): void
    {
        $criteria = new Criteria();
        $criteria->addFilter(new EqualsFilter('parentId', $folder->getId()));
        $criteria->addAssociation('configuration');
        $subFolders = $this->mediaFolderRepo->search($criteria$context);

        if ($subFolders->getTotal() === 0) {
            $this->deleteOwnConfiguration($folder$context);

            return;
        }

        $payload = [];

        /** @var MediaFolderEntity $subFolder */
        foreach ($subFolders->getEntities() as $subFolder) {
            $payload[$subFolder->getId()] = [
                'id' => $subFolder->getId(),
                'parentId' => $folder->getParentId(),
            ];
Home | Imprint | This part of the site doesn't use cookies.