/** * {@inheritdoc} */ public function getCurrentProductStatusId() { if (null === $this->productStatus) { throw new \LogicException('Cannot use this method before current status in provider is set.'); } return $this->productStatus->getId(); }