hydrateRuleIds example

foreach ($event->getEvents() ?? [] as $nestedEvent) {
            if (!$nestedEvent instanceof EntityWrittenEvent) {
                continue;
            }

            $definition = $this->getAssociationDefinitionByEntity($associationFields$nestedEvent->getEntityName());

            if (!$definition) {
                continue;
            }

            $ruleIds = $this->hydrateRuleIds($this->getForeignKeyFields($definition)$nestedEvent$ruleIds);
        }

        if (empty($ruleIds)) {
            return;
        }

        $this->update(Uuid::fromBytesToHexList(array_unique(array_filter($ruleIds))));

        $this->cacheInvalidator->invalidate([CachedRuleLoader::CACHE_KEY]);
    }

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