/** * @return string */ public function getAbsFileName() { $directory = $this->config->phpCodePath . $this->tables[$this->name]['base']; CRM_Core_CodeGen_Util_File::createDir($directory); $absFileName = $directory . $this->getRelFileName(); return $absFileName; }
public function run() { CRM_Core_CodeGen_Util_File::createDir($this->config->sqlCodePath); $this->generateCreateSql(); $this->generateDropSql(); $this->generateLocaleDataSql(); // also create the archive tables // $this->generateCreateSql('civicrm_archive.mysql' ); // $this->generateDropSql('civicrm_archive_drop.mysql'); $this->generateNavigation(); $this->generateSample(); }
public function generateDAOs() { foreach (array_keys($this->tables) as $name) { echo "Generating {$name} as " . $this->tables[$name]['fileName'] . "\n"; if (empty($this->tables[$name]['base'])) { echo "No base defined for {$name}, skipping output generation\n"; continue; } $template = new CRM_Core_CodeGen_Util_Template('php'); $template->assign('table', $this->tables[$name]); $directory = $this->config->phpCodePath . $this->tables[$name]['base']; CRM_Core_CodeGen_Util_File::createDir($directory); $template->run('dao.tpl', $directory . $this->tables[$name]['fileName']); } }