コード例 #1
0
ファイル: component.php プロジェクト: joshjim27/jobsglobal
 /**
  * @see	JDeveloperCreate
  */
 public function loadSubtemplate($filename, $sep = '.')
 {
     $sub = parent::loadSubtemplate($filename);
     if ($sub === false) {
         $templateFile = JFile::stripExt($this->templateFile) . $sep . $filename;
         $templateFile = preg_replace("/^site/", "admin", $templateFile);
         foreach ($this->templateDirs as $templateDir) {
             $dir = JDeveloperPath::dots2ds($templateDir . "/" . $templateFile);
             if ($dir !== false) {
                 return new JDeveloperTemplate($dir);
             }
         }
         $this->setError($this->_name . ": Subtemplate <i>'{$basepath}.{$filename}'</i> not found");
         throw new JDeveloperException($this->getErrors());
     }
     return $sub;
 }