public function getValuesData(AttributeInterface $attribute, array $context = null)
    {
        $this->checkAttribute($attribute);
        $valuesData = new ArrayCollection();
        try {
            foreach ($this->getValues($attribute, $context) as $value) {
                $valuesData->add($value->getValueData());
            }
        } catch (ExceptionInterface $e) {
            throw new InvalidValueDataException("Unable to access data for attribute {$attribute->getCode()}", 0, $e);
        }


        return $valuesData;
    }
public function getValuesData(AttributeInterface $attribute, array $context = null)
    {
        $this->checkAttribute($attribute);
        $valuesData = new ArrayCollection();
        try {
            foreach ($this->getValues($attribute, $context) as $value) {
                $valuesData->add($value->getValueData());
            }
        } catch (ExceptionInterface $e) {
            throw new InvalidValueDataException("Unable to access data for attribute {$attribute->getCode()}", 0, $e);
        }


        return $valuesData;
    }
public function getValuesData ( AttributeInterface $ attribute , array $ context = null ) { $ this -> checkAttribute ( $ attribute ) ; $ valuesData = new ArrayCollection ( ) ; try { foreach ( $ this -> getValues ( $ attribute , $ context ) as $ value ) { $ valuesData -> add ( $ value -> getValueData ( ) ) ; } } catch ( ExceptionInterface $ e ) { throw new InvalidValueDataException ( "Unable to access data for attribute {$attribute->getCode()}" , 0 , $ e ) ; } return $ valuesData ; }
Get the values data of multiple values for a given attribute

@param AttributeInterface $attribute
@param array|null         $context

@throws InvalidValueDataException
@throws MissingAttributeException
@throws ContextException

@return ArrayCollection
Get the values data of multiple values for a given attribute