public function add(LayoutBoxConfiguratorInterface $configurator)
    {
        $type = $configurator->getType();
        if ($this->has($type)) {
            throw new \InvalidArgumentException(sprintf('Layout box configurator "%s" already exists.', $type));
        }
        $this->items[$configurator->getType()] = $configurator;
    }
public function add(LayoutBoxConfiguratorInterface $configurator)
    {
        $type = $configurator->getType();
        if ($this->has($type)) {
            throw new \InvalidArgumentException(sprintf('Layout box configurator "%s" already exists.', $type));
        }
        $this->items[$configurator->getType()] = $configurator;
    }
public function add ( LayoutBoxConfiguratorInterface $ configurator ) { $ type = $ configurator -> getType ( ) ; if ( $ this -> has ( $ type ) ) { throw new \ InvalidArgumentException ( sprintf ( 'Layout box configurator "%s" already exists.' , $ type ) ) ; } $ this -> items [ $ configurator -> getType ( ) ] = $ configurator ; }
Adds new configurator to collection

@param LayoutBoxConfiguratorInterface $configurator

@throws \InvalidArgumentException If such configurator already exists in collection
Adds new configurator to collection