| @@ 132-156 (lines=25) @@ | ||
| 129 | * @param ViewFactory $viewFactory |
|
| 130 | * @param array $actions |
|
| 131 | */ |
|
| 132 | public function __construct( |
|
| 133 | $name, |
|
| 134 | EntityLoaderInterface $entityLoader, |
|
| 135 | AdminConfiguration $configuration, |
|
| 136 | MessageHandlerInterface $messageHandler, |
|
| 137 | EventDispatcherInterface $eventDispatcher, |
|
| 138 | AuthorizationCheckerInterface $authorizationChecker, |
|
| 139 | TokenStorageInterface $tokenStorage, |
|
| 140 | RequestHandler $requestHandler, |
|
| 141 | ViewFactory $viewFactory, |
|
| 142 | $actions = [] |
|
| 143 | ) { |
|
| 144 | $this->name = $name; |
|
| 145 | $this->entities = new ArrayCollection(); |
|
| 146 | $this->configuration = $configuration; |
|
| 147 | $this->messageHandler = $messageHandler; |
|
| 148 | $this->eventDispatcher = $eventDispatcher; |
|
| 149 | $this->authorizationChecker = $authorizationChecker; |
|
| 150 | $this->tokenStorage = $tokenStorage; |
|
| 151 | $this->actions = $actions; |
|
| 152 | $this->entityLoader = $entityLoader; |
|
| 153 | $this->dataProvider = $entityLoader->getDataProvider(); |
|
| 154 | $this->viewFactory = $viewFactory; |
|
| 155 | $this->requestHandler = $requestHandler; |
|
| 156 | } |
|
| 157 | ||
| 158 | /** |
|
| 159 | * Load entities and set current action according to request and the optional filters. |
|
| @@ 115-141 (lines=27) @@ | ||
| 112 | * @param AuthorizationCheckerInterface $authorizationChecker |
|
| 113 | * @param TokenStorageInterface $tokenStorage |
|
| 114 | */ |
|
| 115 | public function __construct( |
|
| 116 | array $adminConfigurations, |
|
| 117 | EventDispatcherInterface $eventDispatcher, |
|
| 118 | MessageHandlerInterface $messageHandler, |
|
| 119 | Registry $adminRegistry, |
|
| 120 | ActionRegistry $actionRegistry, |
|
| 121 | ActionFactory $actionFactory, |
|
| 122 | ConfigurationFactory $configurationFactory, |
|
| 123 | DataProviderFactory $dataProviderFactory, |
|
| 124 | ViewFactory $viewFactory, |
|
| 125 | RequestHandler $requestHandler, |
|
| 126 | AuthorizationCheckerInterface $authorizationChecker, |
|
| 127 | TokenStorageInterface $tokenStorage |
|
| 128 | ) { |
|
| 129 | $this->eventDispatcher = $eventDispatcher; |
|
| 130 | $this->configurationFactory = $configurationFactory; |
|
| 131 | $this->adminConfigurations = $adminConfigurations; |
|
| 132 | $this->actionFactory = $actionFactory; |
|
| 133 | $this->messageHandler = $messageHandler; |
|
| 134 | $this->adminRegistry = $adminRegistry; |
|
| 135 | $this->dataProviderFactory = $dataProviderFactory; |
|
| 136 | $this->requestHandler = $requestHandler; |
|
| 137 | $this->authorizationChecker = $authorizationChecker; |
|
| 138 | $this->tokenStorage = $tokenStorage; |
|
| 139 | $this->actionRegistry = $actionRegistry; |
|
| 140 | $this->viewFactory = $viewFactory; |
|
| 141 | } |
|
| 142 | ||
| 143 | /** |
|
| 144 | * Create admins from configuration and load them into the pool. Dispatch ADMIN_CREATE event. |
|