コード例 #1
0
ファイル: uninstall.php プロジェクト: joshjim27/jobsglobal
 public function initialize()
 {
     $buffer = array();
     foreach ($this->tables as $table) {
         $buffer[] = "DROP TABLE IF EXISTS #__" . $table->dbname . ";";
     }
     $this->template->addPlaceholders(array("code" => implode("\n", $buffer)));
     return parent::initialize();
 }
コード例 #2
0
ファイル: exec.php プロジェクト: joshjim27/jobsglobal
 protected function initialize()
 {
     // Global translations
     $this->getLanguage()->addKeys(array("COM_" . strtoupper($this->component->name) => $this->component->display_name), "", false);
     $this->getLanguage()->addKeys(array("N_ITEMS_UNPUBLISHED" => JText::_('COM_JDEVELOPER_N_ITEMS_UNPUBLISHED'), "N_ITEMS_ARCHIVED" => JText::_('COM_JDEVELOPER_N_ITEMS_ARCHIVED'), "N_ITEMS_TRASHED" => JText::_('COM_JDEVELOPER_N_ITEMS_TRASHED'), "N_ITEMS_DELETED" => JText::_('COM_JDEVELOPER_N_ITEMS_DELETED'), "PARAMS_FIELDSET_LABEL" => JText::_('COM_JDEVELOPER_PARAMS_FIELDSET_LABEL')));
     // System translations
     $this->getLanguage("sys")->addKeys(array("COM_" . strtoupper($this->component->name) => $this->component->display_name), "", false);
     $this->getLanguage("sys")->addKeys(array(strtoupper($this->component->name) => $this->component->display_name), "", false);
     return parent::initialize();
 }
コード例 #3
0
ファイル: install.php プロジェクト: joshjim27/jobsglobal
 protected function initialize()
 {
     $buffer = array();
     foreach ($this->tables as $table) {
         $create = JDeveloperCreate::getInstance("table.admin.sql", array("item_id" => $table->id));
         $buffer[] = $create->getBuffer();
     }
     $this->template = new JDeveloperTemplate(implode("\n\n", $buffer), false);
     return parent::initialize();
 }
コード例 #4
0
ファイル: update.php プロジェクト: joshjim27/jobsglobal
 public function initialize()
 {
     $buffer = array();
     $model = $this->getModel("Field");
     $db = JFactory::getDbo();
     foreach ($this->tables as $table) {
         if (in_array($table->dbname, $db->getTableList())) {
             $add = JDeveloperHelperTable::missingExtern($table->id, "#__" . $table->dbname);
             $drop = JDeveloperHelperTable::missingIntern($table->id, "#__" . $table->dbname);
             foreach ($add as $field) {
                 $buffer[] = "ALTER TABLE #__{$table->dbname} ADD " . $model->toSQL($field) . ";";
             }
             foreach ($drop as $column) {
                 $buffer[] = "ALTER TABLE #__{$table->dbname} DROP `" . $column->Field . "`;";
             }
         }
     }
     if (!empty($buffer)) {
         $this->template->addPlaceholders(array("code" => implode("\n", $buffer)));
     } else {
         $this->template->addPlaceholders(array("code" => "\n"));
     }
     return parent::initialize();
 }
コード例 #5
0
ファイル: config.php プロジェクト: joshjim27/jobsglobal
 /**
  * @see JDeveloperCreateComponent::initialize()
  */
 protected function initialize()
 {
     $this->template->addPlaceholders(array("fields" => $this->getConfigFields(), "form" => $this->getForm($this->component->form_id)));
     return parent::initialize();
 }
コード例 #6
0
ファイル: helper.php プロジェクト: joshjim27/jobsglobal
 protected function initialize()
 {
     $this->template->addPlaceHolders(array('getfields' => $this->getFields(), 'submenu' => $this->submenu()));
     return parent::initialize();
 }
コード例 #7
0
ファイル: access.php プロジェクト: joshjim27/jobsglobal
 protected function initialize()
 {
     $this->template->addPlaceHolders(array("Sections" => $this->sections(), "form" => $this->getForm($this->component->form_id_access)));
     return parent::initialize();
 }
コード例 #8
0
ファイル: helper.route.php プロジェクト: joshjim27/jobsglobal
 protected function initialize()
 {
     $this->template->addPlaceHolders(array('items' => $this->getItemRoute()));
     return parent::initialize();
 }
コード例 #9
0
ファイル: manifest.php プロジェクト: joshjim27/jobsglobal
 protected function initialize()
 {
     $this->template->addPlaceHolders(array('author' => $this->component->get('author'), 'author_email' => $this->component->get('author_email'), 'author_url' => $this->component->get('author_url'), 'copyright' => $this->component->get('copyright'), 'creationdate' => date("M Y"), 'licence' => $this->component->get('licence'), 'languages_site' => $this->langSite(), 'languages_admin' => $this->langAdmin(), 'submenus' => $this->submenus(), 'updatefiles' => $this->updateFiles(), 'version' => $this->component->get('version')));
     $this->template->addAreas(array('dbtables' => !empty($this->tables), 'frontend' => $this->component->site, 'mvc' => !empty($this->tables)));
     return parent::initialize();
 }