for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace AtDataGrid\Renderer;
use Zend\View\Model\ViewModel;
class Html implements RendererInterface
{
/**
* Html template
*
* @var string
*/
protected $template = 'at-datagrid/grid';
* Additional css files
protected $customCss = [];
* Additional js files
protected $customJs = [];
* @param $template
* @return $this
public function setTemplate($template)
$this->template = $template;
return $this;
}
* @return string
public function getTemplate()
return $this->template;
* @param string $customCss
public function addCustomCss($customCss)
$this->customCss[] = $customCss;
public function getCustomCss()
return $this->customCss;
public function getCustomJs()
return $this->customJs;
* @param string $customJs
public function addCustomJs($customJs)
$this->customJs[] = $customJs;
* @param array $variables
* @return ViewModel
public function render(array $variables = [])
$variables['customCss'] = $this->getCustomCss();
$variables['customJs'] = $this->getCustomJs();
$viewModel = new ViewModel($variables);
$viewModel->setTemplate($this->getTemplate());
return $viewModel;