public function referredIn($field)
    {
        $result = [];
        foreach ($this->relations as $relation) {
            if (false === $i = array_search($field, $relation->localKeys())) {
                continue;
            }

            $result[$relation->foreignKeys()[$i]] = $relation;
        }

        return $result;
    }
public function referredIn($field)
    {
        $result = [];
        foreach ($this->relations as $relation) {
            if (false === $i = array_search($field, $relation->localKeys())) {
                continue;
            }

            $result[$relation->foreignKeys()[$i]] = $relation;
        }

        return $result;
    }
public function referredIn ( $ field ) { $ result = [ ] ; foreach ( $ this -> relations as $ relation ) { if ( false === $ i = array_search ( $ field , $ relation -> localKeys ( ) ) ) { continue ; } $ result [ $ relation -> foreignKeys ( ) [ $ i ] ] = $ relation ; } return $ result ; }
Returns all relation where field is listed as local key

@param string $field

@return RelationInterface[]
Returns all relation where field is listed as local key