public function getViewPath() { // get reflection $class = new ReflectionClass($this); // get path with alias return '@app/views/widgets/' . Inflector::camel2id($class->getShortName()); }