/** * Returns TRUE if this controller has a template that is specifically designed to handle a * specific action. * * @param string $action * * @return bool */ public function hasActionTemplate($action) { if (isset($this->templates[$action])) { return true; } $parentClass = $this->class; $templates = array(); while ($parentClass != __CLASS__) { $templates[] = strtok($parentClass, '_') . '_' . $action; $parentClass = get_parent_class($parentClass); } return SSViewer::hasTemplate($templates); }