/**
* Wrap the given content in a container if it's not an ajax call.
*
* @param $content
*
* @return string
*/
protected function wrapContentInContainer($content)
{
if (self::$skipWidgetContainer) {
return $content;
}
$container = $this->widget->container();
if (empty($container['element'])) {
$container['element'] = 'div';
}
return '<' . $container['element'] . ' id="' . $this->javascriptFactory->getContainerId() . '" ' . $container['attributes'] . '>' . $content . '</' . $container['element'] . '>';
}