public function callRecursively(ItemInterface $item, $method, $arguments = array())
    {
        call_user_func_array(array($item, $method), $arguments);

        foreach ($item->getChildren() as $child) {
            $this->callRecursively($child, $method, $arguments);
        }
    }
public function callRecursively(ItemInterface $item, $method, $arguments = array())
    {
        call_user_func_array(array($item, $method), $arguments);

        foreach ($item->getChildren() as $child) {
            $this->callRecursively($child, $method, $arguments);
        }
    }
public function callRecursively ( ItemInterface $ item , $ method , $ arguments = array ( ) ) { call_user_func_array ( array ( $ item , $ method ) , $ arguments ) ; foreach ( $ item -> getChildren ( ) as $ child ) { $ this -> callRecursively ( $ child , $ method , $ arguments ) ; } }
Calls a method recursively on all of the children of this item

@example
$menu->callRecursively('setShowChildren', array(false));

@param ItemInterface $item
@param string        $method
@param array         $arguments
Calls a method recursively on all of the children of this item