/** * {@inheritdoc} */ public function getCurrentProductStatusIdentifier() { if ($this->hasCurrentProductStatus()) { return $this->currentProductStatus->getId(); } return null; }
public function indexAction(ProductStatusInterface $status) : Response { $this->getBreadcrumbProvider()->add(new Breadcrumb(['label' => $status->translate()->getName()])); $this->getProductStatusStorage()->setCurrentProductStatus($status); return $this->displayTemplate('index', ['status' => $status]); }
protected function createConditionsCollection(ProductStatusInterface $status) : ConditionsCollection { $conditions = new ConditionsCollection(); $conditions->add(new Eq('status', $status->getId())); return $conditions; }
/** * {@inheritdoc} */ public function indexAction(ProductStatusInterface $productStatus) { $this->addBreadCrumbItem(new BreadcrumbItem(['name' => $productStatus->translate()->getName()])); $this->manager->getProductStatusContext()->setCurrentProductStatus($productStatus); return $this->displayTemplate('index', ['status' => $productStatus]); }