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