if (method_exists($instance, 'initController'
)) { $instance->
initController(Services::
request(), Services::
response(), Services::
logger());
} if (!
method_exists($instance,
$method)) { throw ViewException::
forInvalidCellMethod($class,
$method);
} $output =
$instance instanceof BaseCell
?
$this->
renderCell($instance,
$method,
$params) :
$this->
renderSimpleClass($instance,
$method,
$params,
$class);
// Can we cache it?
if (!
empty($this->cache
) &&
$ttl !== 0
) { $this->cache->
save($cacheName,
$output,
$ttl);
} return $output;
} /**
* Parses the params attribute. If an array, returns untouched.
* If a string, it should be in the format "key1=value key2=value".
* It will be split and returned as an array.
*
* @param array|string|null $params
*
* @return array|null
*/