isset($menuItem['position'
]) ?
(int) $menuItem['position'
] : 0
);
if (isset($menuItem['controller'
])) { $name =
$menuItem['controller'
];
// Index actions aren't appended to the name of the snippet, they are an exemption from the rule
if ($menuItem['action'
] !== 'Index'
) { $name .= '/' .
$menuItem['action'
];
} $this->
saveMenuTranslation($menuItem['label'
],
$name);
} if (isset($menuItem['children'
])) { foreach ($menuItem['children'
] as $child) { $this->
createMenuItem($plugin,
$item,
$child);
} } $this->em->
persist($item);
return $item;
}