@@ 52-64 (lines=13) @@ | ||
49 | * @param CloneHelper $cloneHelper |
|
50 | * @param EventDispatcherInterface $eventDispatcher |
|
51 | */ |
|
52 | public function __construct( |
|
53 | EntityManagerInterface $em, |
|
54 | NodeAdminPublisher $nodeAdminPublisher, |
|
55 | TokenStorageInterface $tokenStorage, |
|
56 | CloneHelper $cloneHelper, |
|
57 | EventDispatcherInterface $eventDispatcher |
|
58 | ) { |
|
59 | $this->em = $em; |
|
60 | $this->nodeAdminPublisher = $nodeAdminPublisher; |
|
61 | $this->tokenStorage = $tokenStorage; |
|
62 | $this->cloneHelper = $cloneHelper; |
|
63 | $this->eventDispatcher = $eventDispatcher; |
|
64 | } |
|
65 | ||
66 | /** |
|
67 | * @param HasNodeInterface $page The page |
@@ 60-72 (lines=13) @@ | ||
57 | * @param EventDispatcherInterface $eventDispatcher The Event dispatcher |
|
58 | * @param CloneHelper $cloneHelper The clone helper |
|
59 | */ |
|
60 | public function __construct( |
|
61 | EntityManager $em, |
|
62 | TokenStorageInterface $tokenStorage, |
|
63 | AuthorizationCheckerInterface $authorizationChecker, |
|
64 | EventDispatcherInterface $eventDispatcher, |
|
65 | CloneHelper $cloneHelper |
|
66 | ) { |
|
67 | $this->em = $em; |
|
68 | $this->tokenStorage = $tokenStorage; |
|
69 | $this->authorizationChecker = $authorizationChecker; |
|
70 | $this->eventDispatcher = $eventDispatcher; |
|
71 | $this->cloneHelper = $cloneHelper; |
|
72 | } |
|
73 | ||
74 | /** |
|
75 | * If there is a draft version it'll try to publish the draft first. Makse snese because if you want to publish the public version you don't publish but you save. |