protected static function initWidgetParameters($widget, array $parameters)
    {
        $param = var_export($parameters, true);
        $param = preg_replace("/'\\$(.*)',/isU", "\$\\1,", $param);
        $param = str_replace('\\\'', '\'', $param);

        return "<?php \$this->widget->setParameters($param);?>\n";
    }