src/ngrest/base/Api.php
private function relationsFromExpand(array $relations, array $expandPrefixes)
    {
        $valid = [];
        foreach ($expandPrefixes as $prefix) {
            foreach ($relations as $relation) {
                if (StringHelper::startsWith($relation, $prefix)) {
                    $valid[] = $relation;
                }
            }
        }
        return $valid;
    }
private function relationsFromExpand(array $relations, array $expandPrefixes)
    {
        $valid = [];
        foreach ($expandPrefixes as $prefix) {
            foreach ($relations as $relation) {
                if (StringHelper::startsWith($relation, $prefix)) {
                    $valid[] = $relation;
                }
            }
        }
        return $valid;
    }
private function relationsFromExpand ( array $ relations , array $ expandPrefixes ) { $ valid = [ ] ; foreach ( $ expandPrefixes as $ prefix ) { foreach ( $ relations as $ relation ) { if ( StringHelper :: startsWith ( $ relation , $ prefix ) ) { $ valid [ ] = $ relation ; } } } return $ valid ; }
Ensure if the expand prefix exists in the relation.

@param array $relations The available relations
@param array $expandPrefixes The available expand relation names
@return array
@since 1.2.3
Ensure if the expand prefix exists in the relation .