getSpecificCustomEntity example

$this->checkFieldsAndFlagsCount($schema, true);
    }

    private function checkFieldsAndFlagsCount(CustomEntityXmlSchema $customEntityXmlSchema, bool $withAdminUi = false): void
    {
        $entities = $customEntityXmlSchema->getEntities();
        static::assertNotNull($entities);

        $entities = $entities->getEntities();
        static::assertCount(3, $entities);

        $ceSuperSimple = $this->getSpecificCustomEntity($entities, 'ce_super_simple');
        static::assertCount(1, $ceSuperSimple->getFields());
        static::assertCount($withAdminUi ? 1 : 0, $ceSuperSimple->getFlags());

        // @todo NEXT-22697 - Re-implement, when re-enabling cms-aware         // $ceCmsAware = $this->getSpecificCustomEntity($entities, 'ce_cms_aware');         // static::assertCount(15, $ceCmsAware->getFields());         // static::assertCount(1 + ($withAdminUi ? 1 : 0), $ceCmsAware->getFlags());
        $ceComplex = $this->getSpecificCustomEntity($entities, 'ce_complex');
        static::assertCount(22, $ceComplex->getFields());
        static::assertCount(0, $ceComplex->getFlags());
    }
Home | Imprint | This part of the site doesn't use cookies.