src/Controller/AdminControllerTrait.php
protected function updateEntityProperty($entity, $property, $value)
    {
        $entityConfig = $this->entity;

        if (!$this->get('easyadmin.property_accessor')->isWritable($entity, $property)) {
            throw new \RuntimeException(\sprintf('The "%s" property of the "%s" entity is not writable.', $property, $entityConfig['name']));
        }

        $this->get('easyadmin.property_accessor')->setValue($entity, $property, $value);

        $this->dispatch(EasyAdminEvents::PRE_UPDATE, ['entity' => $entity, 'newValue' => $value]);
        $this->executeDynamicMethod('update<EntityName>Entity', [$entity]);
        $this->dispatch(EasyAdminEvents::POST_UPDATE, ['entity' => $entity, 'newValue' => $value]);

        $this->dispatch(EasyAdminEvents::POST_EDIT);
    }
protected function updateEntityProperty($entity, $property, $value)
    {
        $entityConfig = $this->entity;

        if (!$this->get('easyadmin.property_accessor')->isWritable($entity, $property)) {
            throw new \RuntimeException(\sprintf('The "%s" property of the "%s" entity is not writable.', $property, $entityConfig['name']));
        }

        $this->get('easyadmin.property_accessor')->setValue($entity, $property, $value);

        $this->dispatch(EasyAdminEvents::PRE_UPDATE, ['entity' => $entity, 'newValue' => $value]);
        $this->executeDynamicMethod('update<EntityName>Entity', [$entity]);
        $this->dispatch(EasyAdminEvents::POST_UPDATE, ['entity' => $entity, 'newValue' => $value]);

        $this->dispatch(EasyAdminEvents::POST_EDIT);
    }
It updates the value of some property of some entity to the new given value.

@param mixed  $entity   The instance of the entity to modify
@param string $property The name of the property to change
@param bool   $value    The new value of the property

@throws \RuntimeException