コード例 #1
0
 function loadCoreAttributeCountry()
 {
     global $objDatabase;
     $countries = \Cx\Core\Country\Controller\Country::getArray($count, $this->langId);
     foreach ($countries as $country) {
         $this->arrAttributes['country_' . $country['id']] = array('type' => 'menu_option', 'multiline' => false, 'mandatory' => false, 'sort_type' => 'asc', 'parent_id' => 'country', 'desc' => $country['name'], 'names' => array($this->langId => $country['name']), 'value' => $country['id'], 'order_id' => 0);
     }
 }
コード例 #2
0
 /**
  * Get Country value from DB
  *
  * @global ADO Connection $objDatabase
  *
  * @return Array
  */
 function getCountry()
 {
     global $objDatabase;
     if (!empty($this->countries)) {
         return $this->countries;
     }
     // Selecting the Country Name from the Database
     $countries = \Cx\Core\Country\Controller\Country::getArray($count);
     foreach ($countries as $country) {
         $this->countries[$country['id']] = array("id" => $country['id'], "name" => $country['name'], "iso_code_2" => $country['alpha2']);
     }
     return $this->countries;
 }
コード例 #3
0
ファイル: ShopManager.class.php プロジェクト: Niggu/cloudrexx
 /**
  * The country settings view
  */
 static function view_settings_countries()
 {
     self::$objTemplate->addBlockfile('SHOP_SETTINGS_FILE', 'settings_block', 'module_shop_settings_countries.html');
     $selected = '';
     $notSelected = '';
     $count = 0;
     foreach (\Cx\Core\Country\Controller\Country::getArray($count) as $country_id => $arrCountry) {
         if (empty($arrCountry['active'])) {
             $notSelected .= '<option value="' . $country_id . '">' . $arrCountry['name'] . "</option>\n";
         } else {
             $selected .= '<option value="' . $country_id . '">' . $arrCountry['name'] . "</option>\n";
         }
     }
     self::$objTemplate->setVariable(array('SHOP_COUNTRY_SELECTED_OPTIONS' => $selected, 'SHOP_COUNTRY_NOTSELECTED_OPTIONS' => $notSelected));
 }