public function getValueByAttributeId($attributeId)
    {
        foreach ($this->values as $valueObject) {
            if ($valueObject->getAttribute()->getId() == $attributeId) {
                return $valueObject;
            }
        }

        return null;
    }
public function getValueByAttributeId($attributeId)
    {
        foreach ($this->values as $valueObject) {
            if ($valueObject->getAttribute()->getId() == $attributeId) {
                return $valueObject;
            }
        }

        return null;
    }
public function getValueByAttributeId ( $ attributeId ) { foreach ( $ this -> values as $ valueObject ) { if ( $ valueObject -> getAttribute ( ) -> getId ( ) == $ attributeId ) { return $ valueObject ; } } return null ; }
Get a value by it's attribute ID

@param int $attributeId

@return ValueInterface|null
Get a value by it s attribute ID