/** * {@inheritdoc} * @throws Exception\StandardException */ public function setValue($value) { if ($this->hasReference()) { throw new Exception\StandardException('Readonly Item', $this->getId(), "It can't be overwritten, because it has references to the other."); } else { parent::setValue($value); } return $this; }