protected function setWidgetBuilder($builder)
    {
        if (is_object($builder)) {
            $this->widgetBuilder = $builder;
        } else {
            throw new InvalidArgumentException(
                sprintf(
                    'Argument must be a widget builder, %s given',
                    (is_object($builder) ? get_class($builder) : gettype($builder))
                )
            );
        }

        return $this;
    }