@@ 358-375 (lines=18) @@ | ||
355 | } |
|
356 | } |
|
357 | ||
358 | if ($this->pagesConfiguration->getPossibleChildTypes( |
|
359 | $node->getRefEntityName() |
|
360 | ) |
|
361 | ) { |
|
362 | $menu->addChild( |
|
363 | 'action.addsubpage', |
|
364 | [ |
|
365 | 'linkAttributes' => [ |
|
366 | 'type' => 'button', |
|
367 | 'class' => 'btn btn-default btn--raise-on-hover', |
|
368 | 'data-toggle' => 'modal', |
|
369 | 'data-keyboard' => 'true', |
|
370 | 'data-target' => '#add-subpage-modal', |
|
371 | ], |
|
372 | 'extras' => ['renderType' => 'button'], |
|
373 | ] |
|
374 | ); |
|
375 | } |
|
376 | ||
377 | if (null !== $node->getParent() && $canEdit) { |
|
378 | $menu->addChild( |
|
@@ 377-391 (lines=15) @@ | ||
374 | ); |
|
375 | } |
|
376 | ||
377 | if (null !== $node->getParent() && $canEdit) { |
|
378 | $menu->addChild( |
|
379 | 'action.duplicate', |
|
380 | [ |
|
381 | 'linkAttributes' => [ |
|
382 | 'type' => 'button', |
|
383 | 'class' => 'btn btn-default btn--raise-on-hover', |
|
384 | 'data-toggle' => 'modal', |
|
385 | 'data-keyboard' => 'true', |
|
386 | 'data-target' => '#duplicate-page-modal', |
|
387 | ], |
|
388 | 'extras' => ['renderType' => 'button'], |
|
389 | ] |
|
390 | ); |
|
391 | } |
|
392 | ||
393 | if ((null !== $node->getParent() || $node->getChildren()->isEmpty()) |
|
394 | && $this->authorizationChecker->isGranted( |