예제 #1
0
 /**
  * Browse all options
  *
  *
  * @return void
  * @access public
  * @static
  */
 function browse()
 {
     $campaingCompId = CRM_Core_Component::getComponentID('CiviCampaign');
     $groupParams = array('name' => $this->_gName);
     $optionValues = CRM_Core_OptionValue::getRows($groupParams, $this->links(), 'component_id,weight');
     foreach ($optionValues as $key => $optionValue) {
         if (CRM_Utils_Array::value('component_id', $optionValue) != $campaingCompId) {
             unset($optionValues[$key]);
         }
     }
     $returnURL = CRM_Utils_System::url("civicrm/admin/campaign/surveyType", "reset=1");
     $filter = "option_group_id = " . $this->_gid;
     CRM_Utils_Weight::addOrder($optionValues, 'CRM_Core_DAO_OptionValue', 'id', $returnURL, $filter);
     $this->assign('rows', $optionValues);
 }
예제 #2
0
 /**
  * Browse all options.
  */
 public function browse()
 {
     $groupParams = array('name' => self::$_gName);
     $optionValue = CRM_Core_OptionValue::getRows($groupParams, $this->links(), 'weight');
     $gName = self::$_gName;
     $returnURL = CRM_Utils_System::url("civicrm/admin/report/options/{$gName}", "reset=1");
     $filter = "option_group_id = " . self::$_gId;
     $session = new CRM_Core_Session();
     $session->replaceUserContext($returnURL);
     CRM_Utils_Weight::addOrder($optionValue, 'CRM_Core_DAO_OptionValue', 'id', $returnURL, $filter);
     $this->assign('rows', $optionValue);
 }
예제 #3
0
파일: Options.php 프로젝트: bhirsch/voipdev
 /**
  * Browse all options
  *  
  * 
  * @return void
  * @access public
  * @static
  */
 function browse()
 {
     require_once 'CRM/Core/OptionValue.php';
     $groupParams = array('name' => self::$_gName);
     $optionValue = CRM_Core_OptionValue::getRows($groupParams, $this->links(), 'component_id,weight');
     $gName = self::$_gName;
     $returnURL = CRM_Utils_System::url("civicrm/admin/options/{$gName}", "reset=1&group={$gName}");
     $filter = "option_group_id = " . self::$_gId;
     require_once 'CRM/Utils/Weight.php';
     CRM_Utils_Weight::addOrder($optionValue, 'CRM_Core_DAO_OptionValue', 'id', $returnURL, $filter);
     $this->assign('rows', $optionValue);
 }
예제 #4
0
 /**
  * Browse all options
  *
  *
  * @return void
  * @access public
  * @static
  */
 function browse()
 {
     if (!self::$_gName) {
         return parent::browse();
     }
     CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'js/crm.livePage.js');
     $groupParams = array('name' => self::$_gName);
     $optionValue = CRM_Core_OptionValue::getRows($groupParams, $this->links(), 'component_id,weight');
     $gName = self::$_gName;
     $returnURL = CRM_Utils_System::url("civicrm/admin/options/{$gName}", "reset=1&group={$gName}");
     $filter = "option_group_id = " . self::$_gId;
     CRM_Utils_Weight::addOrder($optionValue, 'CRM_Core_DAO_OptionValue', 'id', $returnURL, $filter);
     // retrieve financial account name for the payment instrument page
     if ($gName = "payment_instrument") {
         foreach ($optionValue as $key => $option) {
             $optionValue[$key]['financial_account'] = CRM_Financial_BAO_FinancialTypeAccount::getFinancialAccount($key, 'civicrm_option_value');
         }
     }
     $this->assign('includeWysiwygEditor', TRUE);
     $this->assign('rows', $optionValue);
 }
예제 #5
0
 /**
  * Searches for and returnes installed extensions.
  * 
  * @access private
  * @param boolean $fullInfo provide full info (read XML files) if true, otherwise only DB stored data
  * @return array list of extensions
  */
 private function _discoverInstalled($fullInfo = FALSE)
 {
     require_once 'CRM/Core/OptionValue.php';
     require_once 'CRM/Core/Extensions/Extension.php';
     $result = array();
     $groupParams = array('name' => self::OPTION_GROUP_NAME);
     $links = array();
     $ov = CRM_Core_OptionValue::getRows($groupParams, $links);
     foreach ($ov as $id => $entry) {
         $ext = new CRM_Core_Extensions_Extension($entry['value'], $entry['grouping'], $entry['name'], $entry['label'], $entry['description'], $entry['is_active']);
         $ext->setId($id);
         if ($fullInfo) {
             $ext->readXMLInfo();
         }
         $result[$id] = $ext;
     }
     return $result;
 }
예제 #6
0
 /**
  * Browse all options.
  *
  *
  * @return void
  */
 public function browse()
 {
     if (!self::$_gName) {
         return parent::browse();
     }
     $groupParams = array('name' => self::$_gName);
     $optionValue = CRM_Core_OptionValue::getRows($groupParams, $this->links(), 'component_id,weight');
     $gName = self::$_gName;
     $returnURL = CRM_Utils_System::url("civicrm/admin/options/{$gName}", "reset=1&group={$gName}");
     $filter = "option_group_id = " . self::$_gId;
     CRM_Utils_Weight::addOrder($optionValue, 'CRM_Core_DAO_OptionValue', 'id', $returnURL, $filter);
     // retrieve financial account name for the payment method page
     if ($gName = "payment_instrument") {
         foreach ($optionValue as $key => $option) {
             $optionValue[$key]['financial_account'] = CRM_Financial_BAO_FinancialTypeAccount::getFinancialAccount($key, 'civicrm_option_value');
         }
     }
     $this->assign('rows', $optionValue);
 }