public function setupRenderer(Renderer $renderer)
{
$controllerConfig = $this->getControllerConfig();
$actionConfig = $this->getActionConfig();
$config = array_merge($controllerConfig, $actionConfig);
if (count($config) == 0) {
$config = $this->getRouterConfig();
}
// If we don't have any assets listed by now, or if we are mixing in
// the default assets, then merge in the default assets to the config array
$defaultConfig = $this->getDefaultConfig();
if (count($config) == 0 || isset($defaultConfig['options']['mixin']) && $defaultConfig['options']['mixin']) {
$config = array_merge($defaultConfig['assets'], $config);
}
if (count($config) > 0) {
$this->setupRendererFromOptions($renderer, $config);
return true;
}
return false;
}