|
|
|
|
|
|
|
|
$currentAdminSection = null; |
|
|
$currentAdminSection = null; |
|
|
$userMerchant = $this->merchantResolver->getUserMerchant(); |
|
|
$userMerchant = $this->merchantResolver->getUserMerchant(); |
|
|
|
|
|
|
|
|
if($userMerchant!==null){ |
|
|
|
|
|
|
|
|
if ($userMerchant !== null) { |
|
|
$currentAdminSection = $userMerchant->getCurrentAdminSection(); |
|
|
$currentAdminSection = $userMerchant->getCurrentAdminSection(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if($currentAdminSection === null){ |
|
|
|
|
|
$currentAdminSection = $this->sectionRepository->findOneBy(array('isDefault'=>true)); |
|
|
|
|
|
|
|
|
if ($currentAdminSection === null) { |
|
|
|
|
|
$currentAdminSection = $this->sectionRepository->findOneBy(array('isDefault' => true)); |
|
|
|
|
|
if ($currentAdminSection === null) { |
|
|
|
|
|
throw new \ErrorException('Aucune section par défaut définie pour ce merchant'); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
return $currentAdminSection; |
|
|
return $currentAdminSection; |
|
|
} |
|
|
} |
|
|
|
|
|
|