isSamePath($path, $realpath)) { $query = $tool; } } if ($query) { $v = new DialogView($query); $v->setViewRootDirectoryName(DIRNAME_TOOLS); $this->setViewObject($v); } } public function displayBlock($btHandle, $tool) { $bt = BlockType::getByHandle($btHandle); $env = Environment::get(); if (is_object($bt)) { $pkgHandle = $bt->getPackageHandle(); $r = $env->getRecord(DIRNAME_BLOCKS . '/' . $btHandle . '/' . DIRNAME_TOOLS . '/' . $tool . '.php', $pkgHandle); if ($r->exists()) { $v = new DialogView($btHandle . '/' . DIRNAME_TOOLS . '/' . $tool); $v->setViewRootDirectoryName(DIRNAME_BLOCKS); $v->setInnerContentFile($r->file); $this->setViewObject($v); } } } }