public static function filterFieldList($fieldsList, $filters = array())
    {
        $result = array();

        foreach ($fieldsList as $field) {
            if (in_array($field->id, $filters, true)) {
                $result[] = $field;
            }
        }

        return $result;
    }
public static function filterFieldList($fieldsList, $filters = array())
    {
        $result = array();

        foreach ($fieldsList as $field) {
            if (in_array($field->id, $filters, true)) {
                $result[] = $field;
            }
        }

        return $result;
    }
public static function filterFieldList ( $ fieldsList , $ filters = array ( ) ) { $ result = array ( ) ; foreach ( $ fieldsList as $ field ) { if ( in_array ( $ field -> id , $ filters , true ) ) { $ result [ ] = $ field ; } } return $ result ; }
Filter a Fields List to keap only given Fields Ids

@param array $fieldsList Object Field List
@param array $filters    Array of Fields Ids

@return array
Filter a Fields List to keap only given Fields Ids