Subscribers/Article.php 1 location
|
@@ 470-482 (lines=13) @@
|
| 467 |
|
/** |
| 468 |
|
* @return \Shopware\Models\Customer\Group|null |
| 469 |
|
*/ |
| 470 |
|
public function getConnectCustomerGroup() |
| 471 |
|
{ |
| 472 |
|
$repo = $this->modelManager->getRepository(CustomerGroupAttribute::class); |
| 473 |
|
/** @var \Shopware\Models\Attribute\CustomerGroup $model */ |
| 474 |
|
$model = $repo->findOneBy(['connectGroup' => true]); |
| 475 |
|
|
| 476 |
|
$customerGroup = null; |
| 477 |
|
if ($model && $model->getCustomerGroup()) { |
| 478 |
|
return $model->getCustomerGroup(); |
| 479 |
|
} |
| 480 |
|
|
| 481 |
|
return null; |
| 482 |
|
} |
| 483 |
|
|
| 484 |
|
/** |
| 485 |
|
* Load article detail |
Subscribers/CustomerGroup.php 1 location
|
@@ 129-141 (lines=13) @@
|
| 126 |
|
* |
| 127 |
|
* @return int|null |
| 128 |
|
*/ |
| 129 |
|
private function getConnectCustomerGroupId() |
| 130 |
|
{ |
| 131 |
|
$repo = $this->modelManager->getRepository('Shopware\Models\Attribute\CustomerGroup'); |
| 132 |
|
/** @var \Shopware\Models\Attribute\CustomerGroup $model */ |
| 133 |
|
$model = $repo->findOneBy(['connectGroup' => true]); |
| 134 |
|
|
| 135 |
|
$customerGroup = null; |
| 136 |
|
if ($model && $model->getCustomerGroup()) { |
| 137 |
|
return $model->getCustomerGroup()->getId(); |
| 138 |
|
} |
| 139 |
|
|
| 140 |
|
return null; |
| 141 |
|
} |
| 142 |
|
} |
| 143 |
|
|