Example #1
0
 /**
  * Show all tags of a service
  *
  *
  * @method get
  * @route /service/[i:id]/tags
  */
 public function getServiceTagsAction()
 {
     $requestParam = $this->getParams('named');
     $globalTags = TagsRepository::getList('service', $requestParam['id'], 1, 1);
     $globalTagsValues = array();
     foreach ($globalTags as $globalTag) {
         $globalTagsValues[] = $globalTag['text'];
     }
     $heritedTags = TagsRepository::getHeritedTags('service', $requestParam['id']);
     $heritedTagsValues = $heritedTags['values'];
     $tags['tags'] = array('globals' => $globalTagsValues, 'herited' => $heritedTagsValues);
     $tags['success'] = true;
     $this->router->response()->json($tags);
 }
Example #2
0
 /**
  * get list herited tag
  * 
  * @method get
  * @route /tag/[i:id]/[a:objectName]/herited
  */
 public function heritedTagAction()
 {
     $data = '';
     $get = $this->getParams('named');
     if (isset($get['objectName']) && isset($get['id'])) {
         $data = TagsRepository::getHeritedTags($get['objectName'], $get['id']);
     }
     $this->router->response()->json($data);
 }