예제 #1
0
 function DeleteLabel($language, $label, $labelvalue, $modulename, $basepath = null, $forRelationshipLabel = false)
 {
     // remove the label
     require_once 'modules/ModuleBuilder/parsers/parser.label.php';
     ParserLabel::removeLabel($language, $label, $labelvalue, $modulename, $basepath, $forRelationshipLabel);
 }
예제 #2
0
 public function DeleteLabel($language, $label, $labelvalue, $modulename, $basepath = null, $forRelationshipLabel = false)
 {
     // remove the label
     ParserLabel::removeLabel($language, $label, $labelvalue, $modulename, $basepath, $forRelationshipLabel);
 }
 /**
  * Delete label of id field
  * @param TemplateField $fieldId
  * @param $df
  */
 protected function deleteIdLabel(TemplateField $fieldId, $df)
 {
     if ($df instanceof DynamicField) {
         require_once 'modules/ModuleBuilder/parsers/parser.label.php';
         foreach (array_keys($GLOBALS['sugar_config']['languages']) as $language) {
             foreach (ModuleBuilder::getModuleAliases($df->module) as $module) {
                 $mod_strings = return_module_language($language, $module);
                 if (isset($mod_strings[$fieldId->vname])) {
                     ParserLabel::removeLabel($language, $fieldId->vname, $mod_strings[$fieldId->vname], $module);
                 }
             }
         }
     } elseif ($df instanceof MBModule) {
         foreach (array_keys($GLOBALS['sugar_config']['languages']) as $language) {
             $df->deleteLabel($language, $fieldId->vname);
             $df->save();
         }
     }
 }
예제 #4
0
 public function tearDown()
 {
     ParserLabel::removeLabel($GLOBALS['current_language'], $this->idLabelName, $GLOBALS['mod_strings'][$this->idLabelName], $this->module);
     SugarTestHelper::tearDown();
     parent::tearDown();
 }