Completed
Push — master ( 91fdab...75a7b9 )
by
unknown
13:37
created

AdminBundle/Helper/Menu/MenuAdaptorInterface.php (1 issue)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
3
namespace Kunstmaan\AdminBundle\Helper\Menu;
4
5
use Kunstmaan\AdminBundle\Helper\Menu\MenuBuilder;
6
use Kunstmaan\AdminBundle\Helper\Menu\MenuItem;
7
8
use Symfony\Component\HttpFoundation\Request;
9
10
/**
11
 * The menu adaptor can be used to configure the main menu, to do this you need to implement this interface and tag
12
 * your interface with 'kunstmaan_admin.menu.adaptor'
13
 */
14
interface MenuAdaptorInterface
15
{
16
    /**
17
     * In this method you can add children for a specific parent, but also remove and change the already created children
18
     *
19
     * @param MenuBuilder   $menu      The MenuBuilder
20
     * @param MenuItem[]    &$children The current children
21
     * @param MenuItem|null $parent    The parent Menu item
22
     * @param Request       $request   The Request
23
     */
24
    public function adaptChildren(MenuBuilder $menu, array &$children, MenuItem $parent = null, Request $request = null);
0 ignored issues
show
For interfaces and abstract methods it is generally a good practice to add a @return annotation even if it is just @return void or @return null, so that implementors know what to do in the overridden method.

For interface and abstract methods, it is impossible to infer the return type from the immediate code. In these cases, it is generally advisible to explicitly annotate these methods with a @return doc comment to communicate to implementors of these methods what they are expected to return.

Loading history...
25
}
26