source/Core/Model/ListModel.php
public function containsFieldValue($oVal, $sFieldName)
    {
        $sFieldName = $this->_getFieldLongName($sFieldName);
        foreach ($this->_aArray as $obj) {
            if ($obj->{$sFieldName}->value == $oVal) {
                return true;
            }
        }

        return false;
    }
public function containsFieldValue($oVal, $sFieldName)
    {
        $sFieldName = $this->_getFieldLongName($sFieldName);
        foreach ($this->_aArray as $obj) {
            if ($obj->{$sFieldName}->value == $oVal) {
                return true;
            }
        }

        return false;
    }
public function containsFieldValue ( $ oVal , $ sFieldName ) { $ sFieldName = $ this -> _getFieldLongName ( $ sFieldName ) ; foreach ( $ this -> _aArray as $ obj ) { if ( $ obj -> { $ sFieldName } -> value == $ oVal ) { return true ; } } return false ; }
Function checks if there is at least one object in the list which has the given value in the given field

@param mixed  $oVal       The searched value
@param string $sFieldName The name of the field, give "oxid" will access the classname__oxid field

@return boolean
Function checks if there is at least one object in the list which has the given value in the given field