AdminSearch extends AppController
Admin Search. Searches clients, invoices, transactions, services, and plugin events.
Table of Contents
Methods
| index() | Handle search requests and results |
| preAction() | Search pre-action |
| clients() | Search clients |
| invoices() | Search invoices |
| isValid() | Validate whether the given search type is acceptable or not |
| packages() | Search packages |
| saveSearchType() | Updates the staff setting, saving the currently selected search type |
| services() | Search services |
| smart() | Smart search, search all criteria |
| transactions() | Search transactions |
Methods
index()
Handle search requests and results
public
index() : mixed
preAction()
Search pre-action
public
preAction() : mixed
clients()
Search clients
private
clients(string $search[, int $page = 1 ][, bool $pagination = true ]) : array<string|int, mixed>
Parameters
- $search : string
-
The search query to perform
- $page : int = 1
-
The page to fetch
- $pagination : bool = true
-
Whether or not to include pagination
Return values
array<string|int, mixed> —An multi-dimensional array of parameters to set in a full view (contents include partial view)
invoices()
Search invoices
private
invoices(string $search[, int $page = 1 ][, bool $pagination = true ]) : array<string|int, mixed>
Parameters
- $search : string
-
The search query to perform
- $page : int = 1
-
The page to fetch
- $pagination : bool = true
-
Whether or not to include pagination
Return values
array<string|int, mixed> —An multi-dimensional array of parameters to set in a full view (contents include partial view)
isValid()
Validate whether the given search type is acceptable or not
private
isValid(string $search_type) : bool
Parameters
- $search_type : string
-
The type of search to validate
Return values
bool —True if the search type is valid, false otherwise
packages()
Search packages
private
packages(string $search[, int $page = 1 ][, bool $pagination = true ]) : array<string|int, mixed>
Parameters
- $search : string
-
The search query to perform
- $page : int = 1
-
The page to fetch
- $pagination : bool = true
-
Whether or not to include pagination
Return values
array<string|int, mixed> —An multi-dimensional array of parameters to set in a full view (contents include partial view)
saveSearchType()
Updates the staff setting, saving the currently selected search type
private
saveSearchType(string $search_type) : mixed
Parameters
- $search_type : string
-
The type of search to save
services()
Search services
private
services(string $search[, int $page = 1 ][, bool $pagination = true ]) : array<string|int, mixed>
Parameters
- $search : string
-
The search query to perform
- $page : int = 1
-
The page to fetch
- $pagination : bool = true
-
Whether or not to include pagination
Return values
array<string|int, mixed> —An multi-dimensional array of parameters to set in a full view (contents include partial view)
smart()
Smart search, search all criteria
private
smart(string $search) : array<string|int, mixed>
Parameters
- $search : string
-
The search query to perform
Return values
array<string|int, mixed> —An array of key/value pairs where each key is the search type and each value is the HTML code containing the results
transactions()
Search transactions
private
transactions(string $search[, int $page = 1 ][, bool $pagination = true ]) : array<string|int, mixed>
Parameters
- $search : string
-
The search query to perform
- $page : int = 1
-
The page to fetch
- $pagination : bool = true
-
Whether or not to include pagination
Return values
array<string|int, mixed> —An multi-dimensional array of parameters to set in a full view (contents include partial view)