Пример #1
0
 function action_SaveRelationshipLabel()
 {
     $selected_lang = !empty($_REQUEST['relationship_lang']) ? $_REQUEST['relationship_lang'] : $_SESSION['authenticated_user_language'];
     if (empty($_REQUEST['view_package'])) {
         require_once 'modules/ModuleBuilder/parsers/relationships/DeployedRelationships.php';
         $relationships = new DeployedRelationships($_REQUEST['view_module']);
         if (!empty($_REQUEST['relationship_name'])) {
             if ($relationship = $relationships->get($_REQUEST['relationship_name'])) {
                 $metadata = $relationship->buildLabels(true);
                 require_once 'modules/ModuleBuilder/parsers/parser.label.php';
                 $parser = new ParserLabel($_REQUEST['view_module']);
                 $parser->handleSaveRelationshipLabels($metadata, $selected_lang);
             }
         }
     } else {
         //TODO FOR MB
     }
     $this->view = 'relationships';
 }
Пример #2
0
 public function action_SaveRelationshipLabel()
 {
     global $locale;
     if (!empty($_REQUEST['relationship_lang'])) {
         $selected_lang = $_REQUEST['relationship_lang'];
     } else {
         $selected_lang = $locale->getAuthenticatedUserLanguage();
     }
     if (empty($_REQUEST['view_package'])) {
         $relationships = new DeployedRelationships($_REQUEST['view_module']);
         if (!empty($_REQUEST['relationship_name'])) {
             if ($relationship = $relationships->get($_REQUEST['relationship_name'])) {
                 $metadata = $relationship->buildLabels(true);
                 $parser = new ParserLabel($_REQUEST['view_module']);
                 $parser->handleSaveRelationshipLabels($metadata, $selected_lang);
             }
         }
     } else {
         //TODO FOR MB
     }
     $this->view = 'relationships';
 }