src/CRUDlex/MySQLData.php
protected function enrichWithReference(array &$entities)
    {
        if (empty($entities)) {
            return;
        }
        foreach ($this->definition->getFieldNames() as $field) {
            if ($this->definition->getType($field) !== 'reference') {
                continue;
            }
            $this->fetchReferencesForField($entities, $field);
        }
    }
protected function enrichWithReference(array &$entities)
    {
        if (empty($entities)) {
            return;
        }
        foreach ($this->definition->getFieldNames() as $field) {
            if ($this->definition->getType($field) !== 'reference') {
                continue;
            }
            $this->fetchReferencesForField($entities, $field);
        }
    }
protected function enrichWithReference ( array & $ entities ) { if ( empty ( $ entities ) ) { return ; } foreach ( $ this -> definition -> getFieldNames ( ) as $ field ) { if ( $ this -> definition -> getType ( $ field ) !== 'reference' ) { continue ; } $ this -> fetchReferencesForField ( $ entities , $ field ) ; } }
Adds the id and name of referenced entities to the given entities. Each
reference field is before the raw id of the referenced entity and after
the fetch, it's an array with the keys id and name.

@param Entity[] &$entities
the entities to fetch the references for

@return void
Adds the id and name of referenced entities to the given entities . Each reference field is before the raw id of the referenced entity and after the fetch it s an array with the keys id and name .