* @package editor * @link https://www.zentao.net */ class editorZen extends editor { /** * @param string $filePath * @param string $action * @param string $isExtends */ protected function buildContentByAction($filePath, $action, $isExtends = '') { if(empty($filePath)) return ''; if($action == 'extendModel') return $this->editor->extendModel($filePath); if($action == 'newPage') return $this->editor->newControl($filePath); if($action == 'extendControl' && !empty($isExtends)) return $this->editor->extendControl($filePath, $isExtends); if(($action == 'edit' or $action == 'override') && file_exists($filePath)) { $fileContent = file_get_contents($filePath); if($action == 'override') { $fileContent = str_replace("'../../", '$this->app->getModuleRoot() . \'', $fileContent); $fileContent = str_replace(array('\'./', '"./'), array('\'../../view/', '"../../view'), $fileContent); } return $fileContent; } if(strrpos(basename($filePath), '.php') !== false) return "