@@ 59-71 (lines=13) @@ | ||
56 | * @param EventDispatcherInterface $eventDispatcher The Event dispatcher |
|
57 | * @param CloneHelper $cloneHelper The clone helper |
|
58 | */ |
|
59 | public function __construct( |
|
60 | EntityManager $em, |
|
61 | TokenStorageInterface $tokenStorage, |
|
62 | AuthorizationCheckerInterface $authorizationChecker, |
|
63 | EventDispatcherInterface $eventDispatcher, |
|
64 | CloneHelper $cloneHelper |
|
65 | ) { |
|
66 | $this->em = $em; |
|
67 | $this->tokenStorage = $tokenStorage; |
|
68 | $this->authorizationChecker = $authorizationChecker; |
|
69 | $this->eventDispatcher = $eventDispatcher; |
|
70 | $this->cloneHelper = $cloneHelper; |
|
71 | } |
|
72 | ||
73 | /** |
|
74 | * 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. |
@@ 45-57 (lines=13) @@ | ||
42 | /** |
|
43 | * NodeHelper constructor. |
|
44 | */ |
|
45 | public function __construct( |
|
46 | EntityManagerInterface $em, |
|
47 | NodeAdminPublisher $nodeAdminPublisher, |
|
48 | TokenStorageInterface $tokenStorage, |
|
49 | CloneHelper $cloneHelper, |
|
50 | EventDispatcherInterface $eventDispatcher |
|
51 | ) { |
|
52 | $this->em = $em; |
|
53 | $this->nodeAdminPublisher = $nodeAdminPublisher; |
|
54 | $this->tokenStorage = $tokenStorage; |
|
55 | $this->cloneHelper = $cloneHelper; |
|
56 | $this->eventDispatcher = $eventDispatcher; |
|
57 | } |
|
58 | ||
59 | /** |
|
60 | * @param HasNodeInterface $page The page |