コード例 #1
0
ファイル: Block.php プロジェクト: nouphet/vtigercrm-6.0.0-ja
 /**
  * Function to get fields for this block
  * @return <Array> list of Field models list <Settings_Webforms_Field_Model>
  */
 public function getFields()
 {
     if (empty($this->fields)) {
         $tableName = 'vtiger_webforms';
         $tabId = getTabid('Webforms');
         $fieldsList = array('name' => array('uitype' => '1', 'name' => 'name', 'label' => 'Webform Name', 'typeofdata' => 'V~M', 'diplaytype' => '1'), 'targetmodule' => array('uitype' => '16', 'name' => 'targetmodule', 'label' => 'Module', 'typeofdata' => 'V~O', 'diplaytype' => '1'), 'returnurl' => array('uitype' => '17', 'name' => 'returnurl', 'label' => 'Return Url', 'typeofdata' => 'V~O', 'diplaytype' => '1', 'defaultvalue' => ''), 'ownerid' => array('uitype' => '53', 'name' => 'ownerid', 'label' => 'Assigned To', 'typeofdata' => 'V~M', 'diplaytype' => '1'), 'posturl' => array('uitype' => '1', 'name' => 'posturl', 'label' => 'Post Url', 'typeofdata' => 'V~O', 'diplaytype' => '5'), 'publicid' => array('uitype' => '1', 'name' => 'publicid', 'label' => 'Public Id', 'typeofdata' => 'V~O', 'diplaytype' => '5'), 'enabled' => array('uitype' => '56', 'name' => 'enabled', 'label' => 'Status', 'typeofdata' => 'C~O', 'diplaytype' => '1', 'defaultvalue' => '1'), 'description' => array('uitype' => '19', 'name' => 'description', 'label' => 'Description', 'typeofdata' => 'V~O', 'defaultvalue' => ''));
         foreach ($fieldsList as $fieldName => $fieldDetails) {
             $fieldModel = Settings_Webforms_Field_Model::getInstanceByRow($fieldDetails);
             $fieldModel->block = $this;
             $fieldModel->module = $this->module;
             $fieldModelsList[$fieldName] = $fieldModel;
         }
         $this->fields = $fieldModelsList;
     }
     return $this->fields;
 }
コード例 #2
0
ファイル: Block.php プロジェクト: Bergdahls/YetiForceCRM
 /**
  * Function to get fields for this block
  * @return <Array> list of Field models list <Settings_Webforms_Field_Model>
  */
 public function getFields()
 {
     if (empty($this->fields)) {
         $tableName = 'vtiger_webforms';
         $tabId = getTabid('Webforms');
         $blockName = $this->get('name');
         switch ($blockName) {
             case 'LBL_WEBFORM_INFORMATION':
                 $fieldsList = array('name' => array('uitype' => '1', 'name' => 'name', 'label' => 'WebForm Name', 'typeofdata' => 'V~M', 'diplaytype' => '1'), 'targetmodule' => array('uitype' => '16', 'name' => 'targetmodule', 'label' => 'Module', 'typeofdata' => 'V~O', 'diplaytype' => '1'), 'returnurl' => array('uitype' => '17', 'name' => 'returnurl', 'label' => 'Return Url', 'typeofdata' => 'V~O', 'diplaytype' => '1', 'defaultvalue' => ''), 'ownerid' => array('uitype' => '53', 'name' => 'ownerid', 'label' => 'Assigned To', 'typeofdata' => 'V~M', 'diplaytype' => '1'), 'posturl' => array('uitype' => '1', 'name' => 'posturl', 'label' => 'Post Url', 'typeofdata' => 'V~O', 'diplaytype' => '5'), 'publicid' => array('uitype' => '1', 'name' => 'publicid', 'label' => 'Public Id', 'typeofdata' => 'V~O', 'diplaytype' => '5'), 'enabled' => array('uitype' => '56', 'name' => 'enabled', 'label' => 'Status', 'typeofdata' => 'C~O', 'diplaytype' => '1', 'defaultvalue' => '1'), 'captcha' => array('uitype' => '56', 'name' => 'captcha', 'label' => 'Captcha Enabled', 'typeofdata' => 'C~O', 'diplaytype' => '1', 'defaultvalue' => '0'), 'description' => array('uitype' => '19', 'name' => 'description', 'label' => 'Description', 'typeofdata' => 'V~O', 'defaultvalue' => ''));
                 break;
             case 'LBL_ASSIGN_USERS':
                 $fieldsList = array('roundrobin' => array('uitype' => '56', 'name' => 'roundrobin', 'label' => 'LBL_ASSIGN_ROUND_ROBIN', 'typeofdata' => 'C~O', 'diplaytype' => '1', 'defaultvalue' => '0'), 'roundrobin_userid' => array('uitype' => '54', 'name' => 'roundrobin_userid', 'label' => 'LBL_ROUNDROBIN_USERS_LIST', 'typeofdata' => 'V~M', 'diplaytype' => '1', 'defaultvalue' => 'NULL'));
                 break;
         }
         foreach ($fieldsList as $fieldName => $fieldDetails) {
             $fieldModel = Settings_Webforms_Field_Model::getInstanceByRow($fieldDetails);
             $fieldModel->block = $this;
             $fieldModel->module = $this->module;
             $fieldModelsList[$fieldName] = $fieldModel;
         }
         $this->fields = $fieldModelsList;
     }
     return $this->fields;
 }
コード例 #3
0
ファイル: List.php プロジェクト: Bergdahls/YetiForceCRM
 /**
  * Function to get the list view header
  * @return <Array> - List of Vtiger_Field_Model instances
  */
 public function getListViewRssHeaders($module)
 {
     $headerFieldModels = array();
     $headerFields = array('title' => array('uitype' => '1', 'name' => 'title', 'label' => 'LBL_SUBJECT', 'typeofdata' => 'V~O', 'diplaytype' => '1'), 'sender' => array('uitype' => '1', 'name' => 'sender', 'label' => 'LBL_SENDER', 'typeofdata' => 'V~O', 'diplaytype' => '1'));
     foreach ($headerFields as $fieldName => $fieldDetails) {
         $fieldModel = Settings_Webforms_Field_Model::getInstanceByRow($fieldDetails);
         $fieldModel->module = $module;
         $fieldModelsList[$fieldName] = $fieldModel;
     }
     return $fieldModelsList;
 }