public function getValues(AttributeInterface $attribute = null, array $context = null)
    {
        $values = $this->getInternalValues($attribute, $context);

        if ($attribute && 0 === \count($values) && null !== $attribute->getDefault()) {
            return $this->createDefaultValues($attribute, $context);
        }

        return $values;
    }
public function getValues(AttributeInterface $attribute = null, array $context = null)
    {
        $values = $this->getInternalValues($attribute, $context);

        if ($attribute && 0 === \count($values) && null !== $attribute->getDefault()) {
            return $this->createDefaultValues($attribute, $context);
        }

        return $values;
    }
public function getValues ( AttributeInterface $ attribute = null , array $ context = null ) { $ values = $ this -> getInternalValues ( $ attribute , $ context ) ; if ( $ attribute && 0 === \ count ( $ values ) && null !== $ attribute -> getDefault ( ) ) { return $ this -> createDefaultValues ( $ attribute , $ context ) ; } return $ values ; }
Return all values matching the attribute code

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

@throws InvalidValueDataException
@throws MissingAttributeException
@throws ContextException

@return Collection|ValueInterface[]
Return all values matching the attribute code