src/CRUDlex/AbstractData.php
protected function getReferenceIds(array $entities, $field)
    {
        $ids = array_map(function(Entity $entity) use ($field) {
            $id = $entity->get($field);
            return is_array($id) ? $id['id'] : $id;
        }, $entities);
        return $ids;
    }
protected function getReferenceIds(array $entities, $field)
    {
        $ids = array_map(function(Entity $entity) use ($field) {
            $id = $entity->get($field);
            return is_array($id) ? $id['id'] : $id;
        }, $entities);
        return $ids;
    }
protected function getReferenceIds ( array $ entities , $ field ) { $ ids = array_map ( function ( Entity $ entity ) use ( $ field ) { $ id = $ entity -> get ( $ field ) ; return is_array ( $ id ) ? $ id [ 'id' ] : $ id ; } , $ entities ) ; return $ ids ; }
Gets an array of reference ids for the given entities.

@param array $entities
the entities to extract the ids
@param string $field
the reference field

@return array
the extracted ids
Gets an array of reference ids for the given entities .