first commit
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
|
||||
class stAllegroBackendBreadcrumbsBuilder extends autoStAllegroBackendBreadcrumbsBuilder
|
||||
{
|
||||
protected $productBreadcrumbsBuilder;
|
||||
|
||||
public function initialize()
|
||||
{
|
||||
parent::initialize();
|
||||
|
||||
if ($this->relatedObject && $this->relatedObject instanceof Product)
|
||||
{
|
||||
stAdminGeneratorHelper::generate('stProduct');
|
||||
|
||||
$this->productBreadcrumbsBuilder = new stProductBreadcrumbsBuilder($this->context, $this->breadcrumbs, null, $this->forwardParameters);
|
||||
}
|
||||
}
|
||||
|
||||
public function getListBreadcrumbs()
|
||||
{
|
||||
if (null === $this->listBreadcrumbs)
|
||||
{
|
||||
if ($this->relatedObject && $this->relatedObject instanceof Product)
|
||||
{
|
||||
$this->defaultBreadcrumbs = $this->productBreadcrumbsBuilder->getEditBreadcrumbs($this->relatedObject);
|
||||
}
|
||||
|
||||
parent::getListBreadcrumbs();
|
||||
}
|
||||
|
||||
return $this->listBreadcrumbs;
|
||||
}
|
||||
|
||||
public function getEditBreadcrumbs(AllegroApiOffer $allegroApiOffer)
|
||||
{
|
||||
if (null === $this->editBreadcrumbs)
|
||||
{
|
||||
if ($this->relatedObject && $this->relatedObject instanceof Product)
|
||||
{
|
||||
$this->defaultBreadcrumbs = $this->getListBreadcrumbs();
|
||||
}
|
||||
parent::getEditBreadcrumbs($allegroApiOffer);
|
||||
}
|
||||
|
||||
return $this->editBreadcrumbs;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user