getStartsWith() public static method

Get tags that start with the given string
public static getStartsWith ( string $term, string $language = null ) : array
$term string The searchstring.
$language string The language to use, if not provided use the working language.
return array
示例#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.');
     } else {
         // get tags
         $tags = BackendTagsModel::getStartsWith($term);
         // output
         $this->output(self::OK, $tags);
     }
 }