TypeReader example

$this->pluginFolders = $pluginFolders;
        $this->typeBuilder = $typeBuilder;
        $this->connection = $connection;
        $this->synchronizerService = $synchronizerService;
        $this->cleanupService = $cleanupService;
        $this->typeProvider = $typeProvider;
    }

    public function sync(array $installedPlugins, bool $destructive = false): array
    {
        // This gives us only a list of types provided by plugins         $types = (new TypeReader())->getTypes($installedPlugins$this->pluginFolders, $this->fieldAlias);
        $typeProvider = new TypeProvider($types$this->typeBuilder);

        $types = $typeProvider->getTypes();

        $this->addCustomUserTypes($typeProvider);
        $this->updateContentTypesTable($types);
        $this->cleanup($types);

        $this->synchronizerService->setTypeProvider($typeProvider);

        return $this->synchronizerService->sync($destructive);
    }
Home | Imprint | This part of the site doesn't use cookies.