protected function renderWindow($window) { if (is_callable($window)) { return call_user_func_array($window, array($this->helper)); } elseif (is_array($window)) { $options = isset($window['options_param']) ? $this->serviceContainer->getParameter($window['options_param']) : array(); if (isset($options['callback'])) { $window['options'] = $options; return call_user_func_array($window, array($this->helper)); } else { $can = true; if (isset($options['credentials'])) { $can = $this->user->can($options['credentials']); } return $can ? $this->helper->renderComponent($window['module'], $window['component'], array_merge(array('options' => $options), $window['params'])) : ''; } } return ''; }
public function renderEventLog(dmHelper $helper) { return $helper->renderComponent('dmLog', 'little', array('name' => 'event')); }