deleteCustomFieldsForApp example


    public function __construct(private readonly EntityRepository $customFieldSetRepository)
    {
    }

    /** * @internal only for use by the app-system */
    public function updateCustomFields(Manifest $manifest, string $appId, Context $context): void
    {
        $context->scope(Context::SYSTEM_SCOPE, function DContext $context) use ($manifest$appId): void {
            $this->deleteCustomFieldsForApp($appId$context);
            $this->addCustomFields($manifest->getCustomFields()$appId$context);
        });
    }

    private function deleteCustomFieldsForApp(string $appId, Context $context): void
    {
        $criteria = new Criteria();
        $criteria->addFilter(new EqualsFilter('appId', $appId));

        /** @var array<string> $ids */
        $ids = $this->customFieldSetRepository->searchIds($criteria$context)->getIds();

        
Home | Imprint | This part of the site doesn't use cookies.