Merge pull request #187 from ftwbzhao/feature/eav

[EAV] Value::setAttribute add return this
This commit is contained in:
Dominik Liebler 2015-11-18 07:26:49 +01:00
commit 24d3862ca6

View File

@ -28,12 +28,15 @@ class Value implements ValueInterface
/**
* @param Attribute $attribute
* @return $this
*/
public function setAttribute(Attribute $attribute)
{
$this->attribute->removeValue($this); // Remove value from current attribute
$attribute->addValue($this); // Add value to new attribute
$this->attribute = $attribute;
return $this;
}
/**