[Flow] Plugable Application Menu with Signals & Slots

Axel Wüstemann awu at qbus.de
Sun Apr 13 19:20:29 CEST 2014


> of course it was a typo, sorry... ;=)  I will report my solution later
> to share my experiences here.
>
> Axel
>

At first I tried to have the menu settings in an own class 
BaseMenuUtility in the base package of my application which holds the 
menuItems properties (settings) and the slot function.

But with this I needed to have a derived MenuUtility class in each 
package, additional to the settings and the signal slot wiring in the 
Package class.

So in my AbstractModuleController I have properties for the menu 
settings like this

/**
  * @var string
  * @Flow\Inject(setting="packageLabel")
  */
protected $packageLabel;

The signal stub and the slot function are also parts of the 
AbstractModuleController.

In the initializeView function I build the menu this way

$menuItems = array();
$this->emitCallForMenu($menuItems);
$view->assign('packages', $menuItems);

$menuItems is passed by reference.

This way all works fine and is very clean and simple.

Bests
Axel


More information about the Flow mailing list