public function getType($name)
    {
        if ($this->hasType($name)) {
            return $this->types[$name];
        } else {
            throw new \InvalidArgumentException(sprintf('Widget type "%s" not found.', $name));
        }
    }
public function getType($name)
    {
        if ($this->hasType($name)) {
            return $this->types[$name];
        } else {
            throw new \InvalidArgumentException(sprintf('Widget type "%s" not found.', $name));
        }
    }
public function getType ( $ name ) { if ( $ this -> hasType ( $ name ) ) { return $ this -> types [ $ name ] ; } else { throw new \ InvalidArgumentException ( sprintf ( 'Widget type "%s" not found.' , $ name ) ) ; } }
Returns the widget type by name.

@param string $name
@return WidgetTypeInterface
@throws \InvalidArgumentException
Returns the widget type by name .