getFieldsInWriteOrder example



    /** * @param array<string, mixed> $rawData * * @return string[] */
    public function extract(array $rawData, WriteParameterBag $parameters): array
    {
        $definition = $parameters->getDefinition();

        $fields = $this->getFieldsInWriteOrder($definition);

        $pkData = $this->getPrimaryKey($rawData$parameters);

        /** @var Field&StorageAware $pkField */
        foreach ($definition->getPrimaryKeys() as $pkField) {
            $parameters->getContext()->set(
                $parameters->getDefinition()->getEntityName(),
                $pkField->getPropertyName(),
                $pkField->getSerializer()->decode($pkField$pkData[$pkField->getStorageName()]),
            );
        }

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