Cake\ElasticSearch\Type::newEntities PHP Method

newEntities() public method

This is most useful when hydrating request data back into entities. For example, in your controller code: $articles = $this->Articles->newEntities($this->request->data()); The hydrated entities can then be iterated and saved.
public newEntities ( array $data, array $options = [] ) : array
$data array The data to build an entity with.
$options array A list of options for the objects hydration.
return array An array of hydrated records.
    public function newEntities(array $data, array $options = [])
    {
        return $this->marshaller()->many($data, $options);
    }