Group FEWO | Upload Image FEWO | POS
Gruppen für die FEWO Upload Images bei den Gruppen + vor und nach Pos Sortierungen bei den Images Einbau in den Frontend Silder Bilder zuweisen pre + page + post git-svn-id: http://78.47.251.156/svn/dev/sterntours-3@3367 f459cee4-fb09-11de-96c3-f9c5f16c3c76
This commit is contained in:
parent
ff986cd437
commit
1293c19bc6
25 changed files with 1249 additions and 37 deletions
|
|
@ -9,6 +9,7 @@ namespace AppBundle\Controller;
|
|||
|
||||
use AppBundle\Entity\Page;
|
||||
use AppBundle\Entity\SunstarTravelProgram;
|
||||
use AppBundle\Entity\FewoLodgingGroup;
|
||||
use AppBundle\Form\TtSearchRequestType;
|
||||
use AppBundle\Listener\KernelControllerListener;
|
||||
use Doctrine\ORM\EntityManager;
|
||||
|
|
@ -55,9 +56,14 @@ class CmsController extends Controller
|
|||
$settings = [];
|
||||
}
|
||||
|
||||
$fewoLodgingGroupRepo = $this->getEntityManager()->getRepository('AppBundle:FewoLodgingGroup');
|
||||
$lodgingGroups = $fewoLodgingGroupRepo->findAll();
|
||||
|
||||
|
||||
return $this->render('default/pages/cms/overview.html.twig', array_merge($settings, [
|
||||
'base_dir' => realpath($this->getParameter('kernel.root_dir').'/..').DIRECTORY_SEPARATOR,
|
||||
'page' => $page,
|
||||
'lodgingGroups' => $lodgingGroups,
|
||||
]));
|
||||
}
|
||||
|
||||
|
|
@ -143,10 +149,29 @@ class CmsController extends Controller
|
|||
$calendar = $paddedCalendar;
|
||||
}
|
||||
|
||||
$imgs = array();
|
||||
$imgs_pre = array();
|
||||
$imgs_post = array();
|
||||
|
||||
$lodgingGroup = $lodging->getGroup();
|
||||
foreach ($lodgingGroup->getImages() as $image) {
|
||||
if($image->getComp() == 'pre'){
|
||||
$imgs_pre[] = $image;
|
||||
}
|
||||
if($image->getComp() == 'post'){
|
||||
$imgs_post[] = $image;
|
||||
}
|
||||
}
|
||||
foreach ($lodging->getImages() as $image) {
|
||||
$imgs[] = $image;
|
||||
}
|
||||
|
||||
|
||||
return $this->render('default/pages/cms/fewoTravelProgram.html.twig', [
|
||||
'base_dir' => realpath($this->getParameter('kernel.root_dir').'/..').DIRECTORY_SEPARATOR,
|
||||
'page' => $page,
|
||||
'fewo_lodging' => $lodging,
|
||||
'slider_imgs' => array_merge ($imgs_pre, $imgs, $imgs_post),
|
||||
//'lodging' => $lodging, //so wurde es im AdminController aufgerufen
|
||||
'calendar' => $calendar,
|
||||
'show_search_sidebar_widget' => false,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue