allow json in search response and abstract interactive loading from select2

This commit is contained in:
2018-08-27 13:14:15 +02:00
parent 45946082ea
commit 1826c63251
7 changed files with 46 additions and 23 deletions

View File

@@ -57,9 +57,10 @@ interface SearchInterface
* @param int $start the first result (for pagination)
* @param int $limit the number of result (for pagination)
* @param array $option the options, specific for each search
* @param string $format The format for result
* @return string, an HTML string
*/
public function renderResult(array $terms, $start=0, $limit=50, array $options = array());
public function renderResult(array $terms, $start=0, $limit=50, array $options = array(), $format = 'html');
/**
* we may desactive the search interface by default. in this case,
@@ -85,6 +86,6 @@ interface SearchInterface
*
* @return boolean
*/
public function supports($domain);
public function supports($domain, $format);
}