Exemplo n.º 1
0
 function GetFieldsList()
 {
     $fields = new CXMLCreator('Fields');
     $fields->addChild(CXMLCreator::createTagAttributed('Field id="TITLE" name="' . GetMessage('CRM_FIELD_TITLE') . '" type="string" require="true" default=""', ''));
     $fields->addChild(CXMLCreator::createTagAttributed('Field id="NAME" name="' . GetMessage('CRM_FIELD_NAME') . '" type="string" require="false" default=""', ''));
     $fields->addChild(CXMLCreator::createTagAttributed('Field id="LAST_NAME" name="' . GetMessage('CRM_FIELD_LAST_NAME') . '" type="string" require="false" default=""', ''));
     $fields->addChild(CXMLCreator::createTagAttributed('Field id="SECOND_NAME" name="' . GetMessage('CRM_FIELD_SECOND_NAME') . '" type="string" require="false" default=""', ''));
     $ar = CCrmFieldMulti::GetEntityComplexList();
     foreach ($ar as $fieldId => $fieldName) {
         $fields->addChild(CXMLCreator::createTagAttributed('Field id="' . $fieldId . '" name="' . $fieldName . '" type="string" require="false" default=""', ''));
     }
     $fields->addChild(CXMLCreator::createTagAttributed('Field id="COMPANY_TITLE" name="' . GetMessage('CRM_FIELD_COMPANY_TITLE') . '" type="string" require="false" default=""', ''));
     $fields->addChild(CXMLCreator::createTagAttributed('Field id="POST" name="' . GetMessage('CRM_FIELD_POST') . '" type="string" require="false" default=""', ''));
     $fields->addChild(CXMLCreator::createTagAttributed('Field id="ADDRESS" name="' . GetMessage('CRM_FIELD_ADDRESS') . '" type="string" require="false" default=""', ''));
     $fields->addChild(CXMLCreator::createTagAttributed('Field id="COMMENTS" name="' . GetMessage('CRM_FIELD_COMMENTS') . '" type="string" require="false" default=""', ''));
     //$fieldList = CXMLCreator::createTagAttributed('Field id="PRODUCT_ID" name="'.GetMessage('CRM_FIELD_PRODUCT_ID').'" type="string" require="false" default=""', '');
     //	$fieldList->addChild(self::GetProductList());
     //$fields->addChild($fieldList);
     $fieldList = CXMLCreator::createTagAttributed('Field id="STATUS_ID" name="' . GetMessage('CRM_FIELD_STATUS_ID') . '" type="string" require="false" default=""', '');
     $fieldList->addChild(self::GetStatusList());
     $fields->addChild($fieldList);
     $fields->addChild(CXMLCreator::createTagAttributed('Field id="OPPORTUNITY" name="' . GetMessage('CRM_FIELD_OPPORTUNITY') . '" type="double" require="false" default=""', ''));
     $fieldList = CXMLCreator::createTagAttributed('Field id="CURRENCY_ID" name="' . GetMessage('CRM_FIELD_CURRENCY_ID') . '" type="string" default=""', '');
     $fieldList->addChild(self::GetCurrencyList());
     $fields->addChild($fieldList);
     $fields->addChild(CXMLCreator::createTagAttributed('Field id="STATUS_DESCRIPTION" name="' . GetMessage('CRM_FIELD_STATUS_DESCRIPTION') . '" type="text" default=""', ''));
     $fieldList = CXMLCreator::createTagAttributed('Field id="SOURCE_ID" name="' . GetMessage('CRM_FIELD_SOURCE_ID') . '" type="string" default=""', '');
     $fieldList->addChild(self::GetSourceList());
     $fields->addChild($fieldList);
     $fields->addChild(CXMLCreator::createTagAttributed('Field id="SOURCE_DESCRIPTION" name="' . GetMessage('CRM_FIELD_SOURCE_DESCRIPTION') . '" type="text" default=""', ''));
     $CCrmUserType = new CCrmUserType($GLOBALS['USER_FIELD_MANAGER'], CCrmLead::$sUFEntityID);
     $CCrmUserType->AddWebserviceFields($fields);
     return array('GetFieldsListResult' => $fields);
 }
Exemplo n.º 2
0
 function GetFieldsList()
 {
     $fields = new CXMLCreator('Fields');
     $fields->addChild(CXMLCreator::createTagAttributed('Field id="NAME" name="' . GetMessage('CRM_FIELD_NAME') . '" type="string" require="false" default=""', ''));
     $fields->addChild(CXMLCreator::createTagAttributed('Field id="LAST_NAME" name="' . GetMessage('CRM_FIELD_LAST_NAME') . '" type="string" require="false" default=""', ''));
     $fields->addChild(CXMLCreator::createTagAttributed('Field id="SECOND_NAME" name="' . GetMessage('CRM_FIELD_SECOND_NAME') . '" type="string" require="false" default=""', ''));
     $fields->addChild(CXMLCreator::createTagAttributed('Field id="PHOTO" name="' . GetMessage('CRM_FIELD_PHOTO') . '" type="file" require="false" default=""', ''));
     $ar = CCrmFieldMulti::GetEntityComplexList();
     foreach ($ar as $fieldId => $fieldName) {
         $fields->addChild(CXMLCreator::createTagAttributed('Field id="' . $fieldId . '" name="' . $fieldName . '" type="string" require="false" default=""', ''));
     }
     $fields->addChild(CXMLCreator::createTagAttributed('Field id="POST" name="' . GetMessage('CRM_FIELD_POST') . '" type="string" require="false" default=""', ''));
     $fields->addChild(CXMLCreator::createTagAttributed('Field id="ADDRESS" name="' . GetMessage('CRM_FIELD_ADDRESS') . '" type="string" require="false" default=""', ''));
     $fields->addChild(CXMLCreator::createTagAttributed('Field id="COMMENTS" name="' . GetMessage('CRM_FIELD_COMMENTS') . '" type="string" require="false" default=""', ''));
     $fieldList = CXMLCreator::createTagAttributed('Field id="TYPE_ID" name="' . GetMessage('CRM_FIELD_TYPE_ID') . '" type="int" default=""', '');
     $fieldList->addChild(self::GetTypeList());
     $fields->addChild($fieldList);
     $fieldList = CXMLCreator::createTagAttributed('Field id="SOURCE_ID" name="' . GetMessage('CRM_FIELD_SOURCE_ID') . '" type="int" default=""', '');
     $fieldList->addChild(self::GetSourceList());
     $fields->addChild($fieldList);
     $fields->addChild(CXMLCreator::createTagAttributed('Field id="SOURCE_DESCRIPTION" name="' . GetMessage('CRM_FIELD_SOURCE_DESCRIPTION') . '" type="text" default=""', ''));
     $CCrmUserType = new CCrmUserType($GLOBALS['USER_FIELD_MANAGER'], CCrmLead::$sUFEntityID);
     $CCrmUserType->AddWebserviceFields($fields);
     return array('GetFieldsListResult' => $fields);
 }