protected function getConstraintsFromfields(array $fields)
    {
        $constraints = [];

        foreach ($fields as $field) {
            if ($field->hasForeignConstraint()) {
                $constraints[] = $field->getForeignConstraint();
            }
        }

        return $constraints;
    }
protected function getConstraintsFromfields(array $fields)
    {
        $constraints = [];

        foreach ($fields as $field) {
            if ($field->hasForeignConstraint()) {
                $constraints[] = $field->getForeignConstraint();
            }
        }

        return $constraints;
    }
protected function getConstraintsFromfields ( array $ fields ) { $ constraints = [ ] ; foreach ( $ fields as $ field ) { if ( $ field -> hasForeignConstraint ( ) ) { $ constraints [ ] = $ field -> getForeignConstraint ( ) ; } } return $ constraints ; }
Gets Foreign contstrains from given fields.

@param array of CrestApps\CodeGenerator\Models\Field $field

@return array of CrestApps\CodeGenerator\Models\ForeignConstraint $field
Gets Foreign contstrains from given fields .