Cake\ElasticSearch\Type::patchEntity PHP Method

patchEntity() public method

This is most useful when editing an existing entity using request data: $article = $this->Articles->patchEntity($article, $this->request->data());
public patchEntity ( Cake\Datasource\EntityInterface $entity, array $data, array $options = [] ) : Cake\Datasource\EntityInterface
$entity Cake\Datasource\EntityInterface the entity that will get the data merged in
$data array key value list of fields to be merged into the entity
$options array A list of options for the object hydration.
return Cake\Datasource\EntityInterface
    public function patchEntity(EntityInterface $entity, array $data, array $options = [])
    {
        $marshaller = $this->marshaller();
        return $marshaller->merge($entity, $data, $options);
    }