src/Charcoal/Ui/Dashboard/DashboardTrait.php
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;
    }
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;
    }
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 ; }
Set a widget builder.

@param  object $builder The builder to create customized widget objects.
@throws InvalidArgumentException If the argument is not a widget builder.
@return DashboardInterface Chainable
Set a widget builder .