initialize()
initialize()
Initialize response headers
Search controller
Search accepts the following parameters via GET:
asc or desc, default is newest first (desc)Search can also work in compatibility mode if a=1 or q= are present in the query
string. In that case, the following substitutions are made:
IF a=1 is present:
IF q=string is present:
indexAction()
Search action, by URLs in the form of:
searchReturns the following items to the view:
Looks for templates in the following order:
Search items implement the Searchable Trait
terminateWithView(string $view, array $params = array(), array $headers = array())
Terminate the action with a view partial. Will dump output directly to browser, but return the action allowing process to continue.
| string | $view | path |
| array | $params | view params |
| array | $headers | optional headers |
buildItemCollection(array $matches) : array
Build collection of items. Casts search results as proper model types.
If model type cannot be determined, will cast as \Ceo\Search\Result type which implements the \Ceo\Traits\Searchable trait.
| array | $matches |
buildPagination( $props, $searchParams) : \Ceo\Pagination\Pagination
Build the pagination object
| $props | ||
| $searchParams |