getAdminUiXmlSchema example


    private array $customEntities;

    protected function setUp(): void
    {
        parent::setUp();

        $this->customEntityEnrichmentService = new CustomEntityEnrichmentService(
            new AdminUiXmlSchemaValidator()
        );
        $this->entitySchema = $this->getCustomEntities();
        $this->adminUiXmlSchema = $this->getAdminUiXmlSchema();

        /** @var Entities $outerEntities */
        $outerEntities = $this->entitySchema->getEntities();
        $this->customEntities = $outerEntities->getEntities();
    }

    public function testEnrichCmsAwareAffectedEntities(): void
    {
        static::markTestSkipped('cms-aware will be re-implemented via NEXT-22697');
        static::assertCount(4, $this->customEntities);

        


    private function update(string $pathToCustomEntityFile, string $extensionEntityType, string $extensionId): ?CustomEntityXmlSchema
    {
        $customEntityXmlSchema = $this->getXmlSchema($pathToCustomEntityFile);
        if ($customEntityXmlSchema === null) {
            return null;
        }

        $customEntityXmlSchema = $this->customEntityEnrichmentService->enrich(
            $customEntityXmlSchema,
            $this->getAdminUiXmlSchema($pathToCustomEntityFile),
        );

        $this->customEntityPersister->update($customEntityXmlSchema->toStorage()$extensionEntityType$extensionId);
        $this->customEntitySchemaUpdater->update();

        return $customEntityXmlSchema;
    }

    private function getXmlSchema(string $pathToCustomEntityFile): ?CustomEntityXmlSchema
    {
        $filePath = Path::join($pathToCustomEntityFile, CustomEntityXmlSchema::FILENAME);
        
Home | Imprint | This part of the site doesn't use cookies.