예제 #1
0
 /**
  * Execute the action
  */
 public function execute()
 {
     parent::execute();
     // get parameters
     $term = SpoonFilter::getPostValue('term', null, '');
     // validate
     if ($term == '') {
         $this->output(self::BAD_REQUEST, null, 'term-parameter is missing.');
     }
     // get tags
     $tags = BackendTagsModel::getStartsWith($term);
     // output
     $this->output(self::OK, $tags);
 }
예제 #2
0
 /**
  * Execute the action
  *
  * @return	void
  */
 public function execute()
 {
     // call parent, this will probably add some general CSS/JS or other required files
     parent::execute();
     // get parameters
     $term = SpoonFilter::getGetValue('term', null, '');
     // validate
     if ($term == '') {
         $this->output(self::BAD_REQUEST, null, 'term-parameter is missing.');
     }
     // get tags
     $tags = BackendTagsModel::getStartsWith($term);
     // output
     $this->output(self::OK, $tags);
 }