<?php
namespace App\Controller;
use Doctrine\Persistence\ManagerRegistry;
use Symfony\Component\HttpKernel\KernelInterface;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Form\Extension\Core\Type\PasswordType;
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
use Symfony\Component\Form\Extension\Core\Type\TextareaType;
use Symfony\Component\Form\Extension\Core\Type\EmailType;
use Symfony\Component\Form\Extension\Core\Type\FileType;
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
use Symfony\Component\Console\Input\ArrayInput;
use Symfony\Bundle\FrameworkBundle\Console\Application;
use Ivory\CKEditorBundle\Form\Type\CKEditorType;
use Symfony\Component\Finder\Finder;
use App\Entity\User;
use App\Entity\Gallery;
use App\Entity\GalleryItem;
use App\Entity\Gallery3D;
use App\Entity\FreeWorld3D;
use Symfony\Contracts\Translation\TranslatorInterface;
use Twig\Environment;
class Gallery3DController extends DefaultController
{
protected ManagerRegistry $doctrine;
protected TranslatorInterface $translator;
protected KernelInterface $appKernel;
protected Environment $twig;
public function __construct(ManagerRegistry $doctrine,
TranslatorInterface $translator,
KernelInterface $appKernel,
Environment $twig)
{
$this->doctrine = $doctrine;
$this->translator = $translator;
$this->appKernel = $appKernel;
$this->twig = $twig;
}
/**
* @Route("/user/{userId}/gallery3D/{gallery3DId}", name="gallery3D")
*/
public function gallery3DAction(Request $request, $userId, $gallery3DId)
{
/* we load session data */
parent::init($request);
$session = $request->getSession();
$logger = $this->getLogger(null, 'gallery 3D: '.$gallery3DId);
//print('<br>QQW user ID: ');
//\Doctrine\Common\Util\Debug::dump($category);
/* we load entity managers */
$em = $this->doctrine->getManager();
$dem = $this->doctrine->getManager('dynamic_em');
/* we get current user */
$user = $em->getRepository(User::class)->getUser($userId);
/* we get current 3D gallery */
$gallery3D = $dem->getRepository(Gallery3D::class)->getGallery3D($gallery3DId);
/* we check if 3D gallery exists
if(empty($gallery3D)) {
$this->addFlash('error', '3D gallery with this ID does not exists 22.');
die('3D gallery with this ID does not exists 22.');
return $this->redirectToRoute('Home');
}
*/
// we get parent gallery items
$galleryItemCollection = null;
if(!empty($gallery3D->getGallery())) {
$galId = $gallery3D->getGallery()->getGalleryId();
$galleryItemCollection = $dem->getRepository(GalleryItem::class)->getGalleryItemList($galId);
}
// we get texture gallery items
$textureItemCollection = null;
if(!empty($gallery3D->getTextureGallery())) {
$galId = $gallery3D->getTextureGallery()->getGalleryId();
$textureItemCollection = $dem->getRepository(GalleryItem::class)->getGalleryItemList($galId);
}
//print('<br>QQW textureItemCollection: ');
//\Doctrine\Common\Util\Debug::dump($textureItemCollection);
//foreach($textureItemCollection as $texture) {
//print('<hr>QQW texture: ');
//\Doctrine\Common\Util\Debug::dump($texture);
//}
// we get 3D template
if(!empty($gallery3D->getTemplate3DPath())) {
$template3D = $gallery3D->getTemplate3DPath();
} else {
$template3D = "gallery3D/gallery3D.html.php";
}
/*
print('<br>QQW gallery ID: '.$gallery3DId);
print('<br>QQW gallery: ');
\Doctrine\Common\Util\Debug::dump($gallery);
*/
$userDirs = $this->getUserFolderPathsFromUserId($user->getUserId());
if((!empty($gallery3D->isIsMediumResize()) && $gallery3D->isIsMediumResize() == true) || $request->request->get('isFullscreen')==='false') {
$isFullscreen = false;
} else {
$isFullscreen = true;
}
if($request->request->get('header')==='false') {
$isHeader = false;
} else {
$isHeader = true;
}
if(!empty($request->request->get('is_footer')) && $request->request->get('footer')=='false') {
$isFooter = false;
} else {
$isFooter = true;
}
$template3D = 'gallery3D/gallery3D.html.php';
if(!empty($gallery3D->getTemplate3DPath())) {
$template3D = 'gallery3D/'.$gallery3D->getTemplate3DPath();
}
$freeWorld = null;
if(!empty($gallery3D->getFreeWorld())) {
$freeWorldId = $gallery3D->getFreeWorld()->getFreeWorld3DId();
$freeWorld = $dem->getRepository(FreeWorld3D::class)->getFreeWorld3D($freeWorldId);
//print('<br>QQW freeWorld: '.$gallery3D->getFreeWorld()->getFreeWorld3DId());
//\Doctrine\Common\Util\Debug::dump($freeWorld);
}
//adds php functions to twig environment
$this->twig->addFunction(new \Twig\TwigFunction('deg2rad', 'deg2rad'));
$this->twig->addFunction(new \Twig\TwigFunction('sin', 'sin'));
$this->twig->addFunction(new \Twig\TwigFunction('imagecreatefromstring', 'imagecreatefromstring'));
$this->twig->addFunction(new \Twig\TwigFunction('file_get_contents', 'file_get_contents'));
$this->twig->addFunction(new \Twig\TwigFunction('ImageSX', 'ImageSX'));
$this->twig->addFunction(new \Twig\TwigFunction('ImageSY', 'ImageSY'));
/* we render 3D template HTML, PHP, X3D */
$response = $this->render($template3D,
array( 'headerData' => '',
'gallery3D' => $gallery3D,
'user' => $user,
'userDirs' => $userDirs,
'logger' => $logger,
'galleryItemCollection' => $galleryItemCollection,
'textureItemCollection' => $textureItemCollection,
'isFooter' => $isFooter,
'isHeader' => $isHeader,
'isFullscreen' => $isFullscreen,
'freeWorld' => $freeWorld
)
);
//$response->headers->set('Content-Type', 'model/vrml');
return $response;
}
/**
* @Route("/gallery3DAdmin", name="gallery3DAdmin")
*/
public function gallery3DAdminAction(Request $request)
{
/* we load session data */
parent::init($request);
$session = $request->getSession();
/* we check if an user is logged in */
if(empty($session->get('user'))) {
return $this->redirectToRoute('login');
}
/* we load entity managers */
$em = $this->doctrine->getManager();
$dem = $this->doctrine->getManager('dynamic_em');
$currentUserId = $session->get('user')->getUserId();
$galleryList = $dem->getRepository(Gallery3D::class)->getGallery3DListByUser($currentUserId);
$galleryCounts = array();
foreach($galleryList as $gallery) {
$gal3DId = $gallery->getGallery3DId();
if(!empty($gallery->getGallery())) {
$galId = $gallery->getGallery()->getGalleryId();
$galCount = $dem->getRepository(GalleryItem::class)->countGalleryItems($galId);
$galleryCounts[$gal3DId] = $galCount;
} else {
$galleryCounts[$gal3DId] = 0;
}
}
//print('<br>QQW galleryCounts: ');
//\Doctrine\Common\Util\Debug::dump($galleryCounts);
$user = $em->getRepository(User::class)->getUser($currentUserId);
/* we render data */
return $this->render('gallery3D.html.twig',
array('headerData' => $this -> getPageHeader($request),
'menu' => $this -> adminMenu($request),
'mainMenu' => $this -> adminMainMenu($request),
'mainMenu' => $this -> adminMainMenu($request),
'galleryList' => $galleryList,
'user' => $user,
'galleryCounts' => $galleryCounts,
)
);
}
/**
* @Route("/gallery3DNew", name="gallery3DNew")
*/
public function gallery3DNewAction(Request $request)
{
/* we load session data */
parent::init($request);
$session = $request->getSession();
/* we load entity managers */
$em = $this->doctrine->getManager();
$dem = $this->doctrine->getManager('dynamic_em');
$currentUserId = $session->get('user')->getUserId();
$user = $em->getRepository(User::class)->getUser($currentUserId);
/* we build form */
$gallery = new Gallery3D;
$formBuilder = $this->createFormBuilder($gallery);
$formBuilder->add('gallery3DName', TextType::class, array(
'required' => true,
'label' => $this->translator->trans('module.gallery_name'),
'attr' => array('class' => 'text_form', 'size' => 22),
'label_attr' => array('class' => 'form_field_label'),
));
$formBuilder->add('save', SubmitType::class, array('label' => $this->translator->trans('form.button.save'),
'attr' => array('class' => 'butt_big')));
$form = $formBuilder->getForm();
$form->handleRequest($request);
if ($request->getMethod() == 'POST') {
if ($form->isValid()) {
$formData = $form->getData();
/* we load users entity manager */
$dem = $this->doctrine->getManager('dynamic_em');
//$userName = $request->request->get('form')['username'];
//$userExist = $em->getRepository(User::class)->getUserFromLogin($userName, $request->request->get('form')['password']);
$gallery->setGallery3DName($formData->getGallery3DName());
$gallery->setUserId($currentUserId);
/* we persist and save */
$dem->persist($gallery);
$dem->flush();
$this->addFlash('notice', 'New 3D Gallery was created.');
return $this->redirectToRoute('gallery3DAdmin');
}
}
/* we render data */
return $this->render('gallery3DNew.html.twig',
array( 'form' => $formBuilder->getForm()->createView(),
'headerData' => $this -> getPageHeader($request),
'menu' => $this -> adminMenu($request),
'mainMenu' => $this -> adminMainMenu($request),
'user' => $user,
)
);
}
/**
* @Route("/gallery3DEdit/{gallery3DId}", name="gallery3DEdit")
*/
public function gallery3DEditAction(Request $request, $gallery3DId)
{
/* we load session data */
parent::init($request);
$session = $request->getSession();
/* we check if an user is logged in */
if(empty($session->get('user'))) {
return $this->redirectToRoute('login');
}
/* we load entity managers */
$em = $this->doctrine->getManager();
$dem = $this->doctrine->getManager('dynamic_em');
$userId = $session->get('user')->getUserId();
/* we get current user */
$user = $em->getRepository(User::class)->getUser($userId);
/* we get current 3D gallery */
$gallery = $dem->getRepository(Gallery3D::class)->getGallery3D($gallery3DId);
/* we get galleries ang gallery items */
$galleryCollection = $dem->getRepository(Gallery::class)->getGalleryListByUser($userId);
/* we get free worlds */
$freeWorldCollection = $dem->getRepository(FreeWorld3D::class)->getFreeWorld3DList();
$userDirs = $this->getUserFolderPaths($request);
$galleryItemCollection = null;
if(!empty($gallery->getGallery())) {
$galId = $gallery->getGallery()->getGalleryId();
$galleryItemCollection = $dem->getRepository(GalleryItem::class)->getGalleryItemList($galId);
}
$galleryItemWebPathCollection = [];
if(!empty($galleryItemCollection)) {
foreach ($galleryItemCollection as $galleryItem) {
$galleryItemId = $galleryItem->getGalleryItemId();
//$new_width = $gallery->getImageThumbWidth();
$new_width = 101;
$new_height = 101;
//$imagePath = 'users/'.$user->getUserName().'/images/'.$product->getImage1();
$imagePath = str_replace("../web/", "", $userDirs['images'] . '/' . $galleryItem->getGalleryItemFile());
//$imageThumbPath = 'users/'.$user->getUserName().'/images/thumb_'.$product->getImage1();
$imageThumbPath = str_replace("../web/", "", $userDirs['images'] . '/thumb_' . $galleryItem->getGalleryItemFile());
//print('qqw imagePath: '.$imagePath);
if (!is_file($imageThumbPath)) {
$imageData = getimagesize($imagePath);
$thumbWidth = $defaultThumbWidth = 500;
$defaultThumbHeight = 150;
$thumbHeight = ($imageData[1] / $imageData[0]) * $defaultThumbWidth;
/* if the thumb height is bigger than allowed thumb height we generate thumb according to height*/
if ($thumbHeight > $defaultThumbHeight) {
$thumbHeight = $defaultThumbHeight;
$thumbWidth = ($imageData[0] / $imageData[1]) * $thumbHeight;
}
/*
print('<br>qqw thumbWidth: '.$thumbWidth);
print('<br>qqw thumbHeight: '.$thumbHeight);
*/
if (exif_imagetype($imagePath) == IMAGETYPE_JPEG) {
$srcimg = ImageCreateFromJPEG($imagePath);
$destimg = imagecreatetruecolor($thumbWidth, $thumbHeight);
if (is_file($imagePath)) {
ImageCopyResized($destimg, $srcimg, 0, 0, 0, 0, $thumbWidth, $thumbHeight, ImageSX($srcimg), ImageSY($srcimg));
ImageJPEG($destimg, $imageThumbPath, 100);
}
}
}
$webPath = $userDirs['web'] . "/images/" . $galleryItem->getGalleryItemFile();
$galleryItemWebPathCollection[$galleryItemId]['webPath'] = $webPath;
$galleryItemWebPathCollection[$galleryItemId]['imageThumbPath'] = $imageThumbPath;
}
}
/* we find 3D templates */
$views = $this->appKernel->getProjectDir() . '/templates/gallery3D/';
//print('<br>qqw views: '.$views);
//$views = $this->appKernel->getRootDir().'/../app/Resources/views/gallery3D/';
//$views = $this->get('kernel')->getRootDir().'/../app/Resources/views/gallery3D/';
$finder = new Finder();
$finder->in($views);
/* we build edit form */
$formBuilder = $this->createFormBuilder($gallery); //$gallery
$formBuilder->add('gallery3DName', TextType::class, array(
'required' => true,
'label' => $this->translator->trans('module.gallery_name'),
'attr' => array('class' => 'text_form', 'size' => 50, 'value' => $gallery->getGallery3DName()),
'label_attr' => array('class' => 'form_field_label')
));
$formBuilder->add('galleryLogoUrl', TextType::class, array(
'required' => false,
'label' => $this->translator->trans('system.logo_url'),
'attr' => array('class' => 'text_form', 'size' => 50, 'value' => $gallery->getGalleryLogoUrl()),
'label_attr' => array('class' => 'form_field_label')
));
/*
$formBuilder->add('template3DPath', TextType::class, array(
'required' => false,
'label' => $this->translator->trans('module.gallery3D_template'),
'attr' => array('class' => 'text_form', 'size' => 50, 'value' => $gallery->getTemplate3DPath()),
'label_attr' => array('class' => 'form_field_label')
));
*/
$formBuilder->add('gallery3DDescription', TextareaType::class, array(
'required' => false,
'label' => $this->translator->trans('module.gallery_description'),
'attr' => array('class' => 'textarea_form', 'cols' => 77, 'rows' => 5, 'value' => $gallery->getGallery3DDescription()),
'label_attr' => array('class' => 'form_textarea_label2'),
'data' => $gallery->getGallery3DDescription(),
));
/* we add gallery list */
$galleries = array();
$galleries['-- select --'] = 0;
foreach($galleryCollection as $gal)
{
$galId = $gal->getGalleryId();
//print('<br>qqw dep: '.$depId);
$galKey = $gal->getGalleryName().' (id:'.$gal->getGalleryId().')';
$galleries[$galKey] = $galId;
}
$selectedGallery = 0;
if(!empty($gallery->getGallery())) {
$selectedGallery = $gallery->getGallery()->getGalleryId();
}
$formBuilder->add('xmlSourcePath', TextType::class, array(
'required' => false,
'label' => $this->translator->trans('system.xml_source'),
'attr' => array('class' => 'text_form', 'size' => 50, 'value' => $gallery->getXmlSourcePath()),
'label_attr' => array('class' => 'form_field_label')
));
$formBuilder->add('galleryId', ChoiceType::class, array(
'choices' => $galleries,
'mapped' => false,
'label' => $this->translator->trans('module.gallery_parent'),
'attr' => array('class' => 'selector'),
'label_attr' => array('class' => 'form_field_label'),
'data' => $selectedGallery
));
/* we add texture gallery list */
/*
$galleries = array();
$galleries['-- select --'] = 0;
foreach($galleryCollection as $gal)
{
$galId = $gal->getGalleryId();
//print('<br>qqw dep: '.$depId);
$galKey = $gal->getGalleryName().' (id:'.$gal->getGalleryId().')';
$galleries[$galKey] = $galId;
}
*/
$selectedGallery = 0;
if(!empty($gallery->getTextureGallery())) {
$selectedGallery = $gallery->getTextureGallery()->getGalleryId();
}
$formBuilder->add('textureGalleryId', ChoiceType::class, array(
'choices' => $galleries,
'mapped' => false,
'label' => $this->translator->trans('module.gallery_texture'),
'attr' => array('class' => 'selector'),
'label_attr' => array('class' => 'form_field_label'),
'data' => $selectedGallery
));
/* we add 3D template list */
$templates3D = array();
foreach ($finder as $file) {
$templates3D[$file->getRelativePathname()] = $file->getRelativePathname();
}
$selectedTemplate3D = 0;
if(!empty($gallery->getTemplate3DPath())) {
$selectedTemplate3D = $gallery->getTemplate3DPath();
}
$formBuilder->add('template3DPath', ChoiceType::class, array(
'choices' => $templates3D,
'label' => $this->translator->trans('module.gallery3D_template'),
'attr' => array('class' => 'selector'),
'label_attr' => array('class' => 'form_field_label'),
'data' => $selectedTemplate3D
));
$formBuilder->add('preferredViewpointPosition', TextType::class, array(
'required' => false,
'label' => $this->translator->trans('freeworld.viewpoint_position'),
'attr' => array('class' => 'text_form', 'size' => 30, 'value' => $gallery->getPreferredViewpointPosition()),
'label_attr' => array('class' => 'form_field_label')
));
$formBuilder->add('preferredViewpointRotation', TextType::class, array(
'required' => false,
'label' => $this->translator->trans('freeworld.viewpoint_rotation'),
'attr' => array('class' => 'text_form', 'size' => 30, 'value' => $gallery->getPreferredViewpointRotation()),
'label_attr' => array('class' => 'form_field_label')
));
$formBuilder->add('preferredBackgroundSkyColor', TextType::class, array(
'required' => false,
'label' => $this->translator->trans('freeworld.background_skycolor'),
'attr' => array('class' => 'text_form', 'size' => 30, 'value' => $gallery->getPreferredBackgroundSkyColor()),
'label_attr' => array('class' => 'form_field_label')
));
$formBuilder->add('preferredBackgroundGroundColor', TextType::class, array(
'required' => false,
'label' => $this->translator->trans('freeworld.background_groundcolor'),
'attr' => array('class' => 'text_form', 'size' => 30, 'value' => $gallery->getPreferredBackgroundGroundColor()),
'label_attr' => array('class' => 'form_field_label')
));
$formBuilder->add('isStartGuide', ChoiceType::class, array(
'choices' => array('Yes' => true, 'No' => false),
'required' => false,
'mapped' => false,
'multiple' => false,
'expanded' => true,
'placeholder' => false,
'label' => $this->translator->trans('module.is_start_guide'),
'label_attr' => array('class' => 'form_field_label'),
'attr' => array('class' => 'form_field_text'),
'data' => $gallery->isIsStartGuide(),
));
$formBuilder->add('guideCycle', TextType::class, array(
'required' => true,
'label' => $this->translator->trans('module.guide_cycle'),
'attr' => array('class' => 'text_form', 'size' => 5, 'value' => $gallery->getGuideCycle()),
'label_attr' => array('class' => 'form_field_label')
));
$formBuilder->add('isMediumResize', ChoiceType::class, array(
'choices' => array('Yes' => true, 'No' => false),
'required' => false,
'mapped' => false,
'multiple' => false,
'expanded' => true,
'placeholder' => false,
'label' => $this->translator->trans('system.is_medium_resize'),
'label_attr' => array('class' => 'form_field_label'),
'attr' => array('class' => 'form_field_text'),
'data' => $gallery->isIsMediumResize(),
));
/* we add 3D freeworld */
$selectedFreeworld = 0;
if(!empty($gallery->getFreeWorld())) {
$selectedFreeworld = $gallery->getFreeWorld()->getFreeWorld3DId();
}
/* we add freeworld list */
$freeworlds = array();
$freeworlds['-- select --'] = 0;
foreach($freeWorldCollection as $freeworld)
{
$freeworldId = $freeworld->getFreeWorld3DId();
//print('<br>qqw dep: '.$depId);
$freeworldKey = $freeworld->getFreeWorld3DName().' (id:'.$freeworld->getFreeWorld3DId().')';
$freeworlds[$freeworldKey] = $freeworldId;
}
$formBuilder->add('freeWorldId', ChoiceType::class, array(
'choices' => $freeworlds,
'mapped' => false,
'label' => $this->translator->trans('module.FreeWorld3D'),
'attr' => array('class' => 'selector'),
'label_attr' => array('class' => 'form_field_label'),
'data' => $selectedFreeworld
));
$formBuilder->add('save', SubmitType::class, array('label' => $this->translator->trans('form.button.save'),
'attr' => array('class' => 'butt_big')));
$form = $formBuilder->getForm();
$form->handleRequest($request);
if ($request->getMethod() == 'POST') {
//$form->bindRequest($request);
if ($form->isValid()) {
// save the object to the database
$formData = $form->getData();
$gallery->setGallery3DName($formData->getGallery3DName());
$gallery->setGallery3DDescription($formData->getGallery3DDescription());
// if(!empty($request->request->get('form')['galleryDescription'])) {
// $gallery->setGallery3DDescription($request->request->get('form')['galleryDescription']);
// }
$gallery->setGalleryLogoUrl($formData->getGalleryLogoUrl());
$gallery->setXmlSourcePath($formData->getXmlSourcePath());
$gallery->setTemplate3DPath($formData->getTemplate3DPath());
$gallery->setPreferredViewpointPosition($formData->getPreferredViewpointPosition());
$gallery->setPreferredViewpointRotation($formData->getPreferredViewpointRotation());
$gallery->setPreferredBackgroundSkyColor($formData->getPreferredBackgroundSkyColor());
$gallery->setPreferredBackgroundGroundColor($formData->getPreferredBackgroundGroundColor());
$gallery->setUserId($userId);
if(!empty($formData->getGuideCycle())) {
$gallery->setGuideCycle($formData->getGuideCycle());
}
if(!empty($form['galleryId']->getData()) && $form['galleryId']->getData() > 0) {
$newGallery = $dem->getRepository(Gallery::class)->getGallery($form['galleryId']->getData());
$gallery->setGallery($newGallery);
} else {
$gallery->setGallery(null);
}
if(!empty($form['textureGalleryId']->getData()) && $form['textureGalleryId']->getData() > 0) {
$textureGallery = $dem->getRepository(Gallery::class)->getGallery($form['textureGalleryId']->getData());
$gallery->setTextureGallery($textureGallery);
} else {
$gallery->setTextureGallery(null);
}
if(!empty($form['freeWorldId']->getData()) && $form['freeWorldId']->getData() > 0) {
$freeWorld = $dem->getRepository(FreeWorld3D::class)->getFreeWorld3D($form['freeWorldId']->getData());
$gallery->setFreeWorld($freeWorld);
} else {
$gallery->setFreeWorld(null);
}
//if(!empty($form['isStartGuide']->getData())) {
$gallery->setIsStartGuide($form['isStartGuide']->getData());
//}
//if(!empty($formData->isIsMediumResize())) {
$gallery->setIsMediumResize($form['isMediumResize']->getData());
//}
/* we persist and save */
$dem->persist($gallery);
$dem->flush();
$this->addFlash('notice', '3D Gallery was updated.');
return $this->redirectToRoute('gallery3DEdit', array('gallery3DId' => $gallery->getGallery3DId()));
}
}
/* we render data */
return $this->render('gallery3DEdit.html.twig',
array('headerData' => $this -> getPageHeader($request),
'gallery' => $gallery,
'form' => $formBuilder->getForm()->createView(),
'user' => $user,
'userDirs' => $userDirs,
'galleryItemCollection' => $galleryItemCollection,
'menu' => $this -> adminMenu($request),
'mainMenu' => $this -> adminMainMenu($request),
'galleryItemWebPathCollection' => $galleryItemWebPathCollection
)
);
}
public function adminMenu(Request $request)
{
$menuItems = array(0 => array('link' => 'services3dAdmin', 'langKey' => 'service.services3d', 'routeName' => 'services3dAdmin'),
1 => array('link' => 'gallery3DAdmin', 'langKey' => 'module.gallery3DAdmin', 'routeName' => 'gallery3DAdmin'),
2 => array('link' => 'gallery3DNew', 'langKey' => 'module.gallery3D_new', 'routeName' => 'gallery3DNew'),
);
return $menuItems;
}
}