src/DebugBar/JavascriptRenderer.php
public function addControl($name, array $options)
    {
        if (count(array_intersect(array_keys($options), array('icon', 'widget', 'tab', 'indicator'))) === 0) {
            throw new DebugBarException("Not enough options for control '$name'");
        }
        $this->controls[$name] = $options;
        return $this;
    }
public function addControl($name, array $options)
    {
        if (count(array_intersect(array_keys($options), array('icon', 'widget', 'tab', 'indicator'))) === 0) {
            throw new DebugBarException("Not enough options for control '$name'");
        }
        $this->controls[$name] = $options;
        return $this;
    }
public function addControl ( $ name , array $ options ) { if ( count ( array_intersect ( array_keys ( $ options ) , array ( 'icon' , 'widget' , 'tab' , 'indicator' ) ) ) === 0 ) { throw new DebugBarException ( "Not enough options for control '$name'" ) ; } $ this -> controls [ $ name ] = $ options ; return $ this ; }
Adds a control to initialize

Possible options:
- icon: icon name
- tooltip: string
- widget: widget class name
- title: tab title
- map: a property name from the data to map the control to
- default: a js string, default value of the data map

"icon" or "widget" are at least needed

@param string $name
@param array $options
Adds a control to initialize