|
@@ 556-565 (lines=10) @@
|
| 553 |
|
/** |
| 554 |
|
* @return int |
| 555 |
|
*/ |
| 556 |
|
public function getDefaultShopId() |
| 557 |
|
{ |
| 558 |
|
$builder = $this->manager->getConnection()->createQueryBuilder(); |
| 559 |
|
$builder->select('cs.id') |
| 560 |
|
->from('s_core_shops', 'cs') |
| 561 |
|
->where('cs.default = :default') |
| 562 |
|
->setParameter('default', true); |
| 563 |
|
|
| 564 |
|
return (int) $builder->execute()->fetchColumn(); |
| 565 |
|
} |
| 566 |
|
|
| 567 |
|
/** |
| 568 |
|
* @return \Shopware\Models\Category\Category |
|
@@ 570-581 (lines=12) @@
|
| 567 |
|
/** |
| 568 |
|
* @return \Shopware\Models\Category\Category |
| 569 |
|
*/ |
| 570 |
|
public function getDefaultShopCategory() |
| 571 |
|
{ |
| 572 |
|
$builder = $this->manager->getConnection()->createQueryBuilder(); |
| 573 |
|
$builder->select('cs.category_id') |
| 574 |
|
->from('s_core_shops', 'cs') |
| 575 |
|
->where('cs.default = :default') |
| 576 |
|
->setParameter('default', true); |
| 577 |
|
|
| 578 |
|
$categoryId = (int) $builder->execute()->fetchColumn(); |
| 579 |
|
|
| 580 |
|
return $this->manager->find('Shopware\Models\Category\Category', $categoryId); |
| 581 |
|
} |
| 582 |
|
|
| 583 |
|
/** |
| 584 |
|
* @return \Shopware\Components\Model\ModelRepository|\Shopware\CustomModels\Connect\ConfigRepository |