|
@@ 580-589 (lines=10) @@
|
| 577 |
|
/** |
| 578 |
|
* @return int |
| 579 |
|
*/ |
| 580 |
|
public function getDefaultShopId() |
| 581 |
|
{ |
| 582 |
|
$builder = $this->manager->getConnection()->createQueryBuilder(); |
| 583 |
|
$builder->select('cs.id') |
| 584 |
|
->from('s_core_shops', 'cs') |
| 585 |
|
->where('cs.default = :default') |
| 586 |
|
->setParameter('default', true); |
| 587 |
|
|
| 588 |
|
return (int) $builder->execute()->fetchColumn(); |
| 589 |
|
} |
| 590 |
|
|
| 591 |
|
/** |
| 592 |
|
* @return \Shopware\Models\Category\Category |
|
@@ 594-605 (lines=12) @@
|
| 591 |
|
/** |
| 592 |
|
* @return \Shopware\Models\Category\Category |
| 593 |
|
*/ |
| 594 |
|
public function getDefaultShopCategory() |
| 595 |
|
{ |
| 596 |
|
$builder = $this->manager->getConnection()->createQueryBuilder(); |
| 597 |
|
$builder->select('cs.category_id') |
| 598 |
|
->from('s_core_shops', 'cs') |
| 599 |
|
->where('cs.default = :default') |
| 600 |
|
->setParameter('default', true); |
| 601 |
|
|
| 602 |
|
$categoryId = (int) $builder->execute()->fetchColumn(); |
| 603 |
|
|
| 604 |
|
return $this->manager->find('Shopware\Models\Category\Category', $categoryId); |
| 605 |
|
} |
| 606 |
|
|
| 607 |
|
/** |
| 608 |
|
* @return \Shopware\Components\Model\ModelRepository|\Shopware\CustomModels\Connect\ConfigRepository |