Commit cea4a207 authored by Nicolas Widart's avatar Nicolas Widart

Using the new translatable trait

parent 277b65fc
<?php namespace Modules\Menu\Entities; <?php namespace Modules\Menu\Entities;
use Baum\Node; use Baum\Node;
use Dimsav\Translatable\Translatable; use Modules\Core\Internationalisation\Translatable;
class Menuitem extends Node class Menuitem extends Node
{ {
......
...@@ -15,7 +15,7 @@ class EloquentMenuItemRepository extends EloquentBaseRepository implements MenuI ...@@ -15,7 +15,7 @@ class EloquentMenuItemRepository extends EloquentBaseRepository implements MenuI
$menuItem->target = $data['target']; $menuItem->target = $data['target'];
$menuItem->module_name = $data['module']; $menuItem->module_name = $data['module'];
unset($data['menu_id'], $data['page_id'], $data['target'], $data['module_name']); unset($data['menu_id'], $data['page_id'], $data['target'], $data['module']);
$translatableData = Helper::separateLanguages($data); $translatableData = Helper::separateLanguages($data);
Helper::updateTranslated($menuItem, $translatableData); Helper::updateTranslated($menuItem, $translatableData);
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
</a> </a>
</div> </div>
</div> </div>
<?php if (!$menuItems->isEmpty()): ?>
<div class="box box-info" style="overflow: hidden;"> <div class="box box-info" style="overflow: hidden;">
<div class="box-body"> <div class="box-body">
<div class="dd"> <div class="dd">
...@@ -41,6 +42,7 @@ ...@@ -41,6 +42,7 @@
</div> </div>
</div> </div>
</div> </div>
<?php endif; ?>
</div> </div>
<div class="col-md-6"> <div class="col-md-6">
<div class="box box-info"> <div class="box box-info">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment