|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
/** |
|
4
|
|
|
* Copyright © 2016-present Spryker Systems GmbH. All rights reserved. |
|
5
|
|
|
* Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file. |
|
6
|
|
|
*/ |
|
7
|
|
|
|
|
8
|
|
|
namespace SprykerEco\Zed\PunchoutCatalogs\Communication\Controller; |
|
9
|
|
|
|
|
10
|
|
|
use Generated\Shared\Transfer\PunchoutCatalogEntryPointFilterTransfer; |
|
|
|
|
|
|
11
|
|
|
use Spryker\Zed\Kernel\Communication\Controller\AbstractController; |
|
12
|
|
|
use Symfony\Component\HttpFoundation\Request; |
|
13
|
|
|
|
|
14
|
|
|
/** |
|
15
|
|
|
* @method \SprykerEco\Zed\PunchoutCatalogs\Persistence\PunchoutCatalogsRepositoryInterface getRepository() |
|
16
|
|
|
* @method \SprykerEco\Zed\PunchoutCatalogs\Business\PunchoutCatalogsFacadeInterface getFacade() |
|
17
|
|
|
* @method \SprykerEco\Zed\PunchoutCatalogs\Communication\PunchoutCatalogsCommunicationFactory getFactory() |
|
18
|
|
|
*/ |
|
19
|
|
|
class EntryPointsController extends AbstractController |
|
20
|
|
|
{ |
|
21
|
|
|
/** |
|
22
|
|
|
* @see \SprykerEco\Zed\PunchoutCatalogs\Communication\Controller\IndexController::indexAction() |
|
23
|
|
|
*/ |
|
24
|
|
|
protected const ROUTE_PUNCHOUT_CATALOGS_CONNECTION_LIST_PAGE = '/punchout-catalogs/'; |
|
25
|
|
|
|
|
26
|
|
|
protected const PARAM_ID_PUNCHOUT_CATALOG_CONNECTION = 'id-punchout-catalog-connection'; |
|
27
|
|
|
|
|
28
|
|
|
protected const MESSAGE_CONNECTION_NOT_FOUND = 'Connection not found'; |
|
29
|
|
|
|
|
30
|
|
|
/** |
|
31
|
|
|
* @param \Symfony\Component\HttpFoundation\Request $request |
|
32
|
|
|
* |
|
33
|
|
|
* @return array|\Symfony\Component\HttpFoundation\RedirectResponse |
|
34
|
|
|
*/ |
|
35
|
|
|
public function viewAction(Request $request) |
|
36
|
|
|
{ |
|
37
|
|
|
$idPunchoutCatalogConnection = $this->castId( |
|
38
|
|
|
$request->query->get(static::PARAM_ID_PUNCHOUT_CATALOG_CONNECTION) |
|
39
|
|
|
); |
|
40
|
|
|
|
|
41
|
|
|
$punchoutCatalogConnectionTransfer = $this->getFacade() |
|
42
|
|
|
->findConnectionById($idPunchoutCatalogConnection); |
|
43
|
|
|
|
|
44
|
|
|
if (!$punchoutCatalogConnectionTransfer) { |
|
45
|
|
|
$this->addErrorMessage(static::MESSAGE_CONNECTION_NOT_FOUND); |
|
46
|
|
|
|
|
47
|
|
|
return $this->redirectResponse(static::ROUTE_PUNCHOUT_CATALOGS_CONNECTION_LIST_PAGE); |
|
48
|
|
|
} |
|
49
|
|
|
|
|
50
|
|
|
$punchoutCatalogEntryPointFilterTransfer = (new PunchoutCatalogEntryPointFilterTransfer()) |
|
51
|
|
|
->setIdCompanyBusinessUnit($punchoutCatalogConnectionTransfer->getFkCompanyBusinessUnit()); |
|
52
|
|
|
|
|
53
|
|
|
$punchoutCatalogEntryPointTransfer = $this->getFactory() |
|
54
|
|
|
->getPunchoutCatalogFacade() |
|
55
|
|
|
->getRequestEntryPointsByBusinessUnit($punchoutCatalogEntryPointFilterTransfer); |
|
56
|
|
|
|
|
57
|
|
|
return [ |
|
58
|
|
|
'punchoutCatalogEntryPoints' => $punchoutCatalogEntryPointTransfer, |
|
59
|
|
|
'punchoutCatalogConnection' => $punchoutCatalogConnectionTransfer, |
|
60
|
|
|
]; |
|
61
|
|
|
} |
|
62
|
|
|
} |
|
63
|
|
|
|
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths