class Solution extends Base
{
- protected static $_menuChildrenDone = false;
-
public function getName()
{
return 'Solution';
public function setMenuChildren($menu)
{
- if (self::$_menuChildrenDone) {
- return;
- }
-
- self::$_menuChildrenDone = true;
-
Debugbar::startMeasure('nav_applications', 'Make applications nav items');
parent::setMenuChildren($menu);
$applications = Application::all();
+ $solution_apps = $menu->getPageData()->get('applications');
+ if (null === $solution_apps || !$solution_apps) {
+ return;
+ }
+
foreach ($applications as $application) {
+ if (!in_array($application->id, $solution_apps)) {
+ continue;
+ }
$item = new PageItem();
$item->initFromEntity($application);
$item->setTitle($application->title);
@foreach($locales['others'] as $code=>$locale)
@php
$alternate=CubistMenu::getCurrentPage()->getTranslatedPage($code,false);
- if(null===$alternate){
-
- }
@endphp
<li><a href="{{$alternate->getURL()}}"
target="_self"><img src="{{ asset('images/locale-'.$locale['flag'].'.svg') }}"