* @param targetPath
* @param currentFile
* @return file if file was created, otherwise null.
*/
public static FileObject createAbsoluteViewFile(String targetPath, FileObject currentFile) {
PhpModule phpModule = PhpModule.Factory.forFileObject(currentFile);
YiiModule yiiModule = YiiModuleFactory.create(phpModule);
FileObject application = yiiModule.getApplication();
// get absolute view within the application
if (targetPath.startsWith(APP_PATH_PREFIX)) { // NOI18N
targetPath = targetPath.replaceFirst(MODULE_PATH_PREFIX, ""); // NOI18N