LiveSearchToolbarItem implements ToolbarItemInterface, RequestAwareToolbarItemInterface
Adds backend live search to the toolbar by adding JavaScript and adding an input search field
Table of Contents
Interfaces
- ToolbarItemInterface
- Interface for classes which extend the backend by adding items to the top toolbar
- RequestAwareToolbarItemInterface
- Interface for toolbar items that need the ServerRequestInterface Request.
Methods
- __construct() : mixed
- checkAccess() : bool
- Checks whether the user has access to this toolbar item.
- getAdditionalAttributes() : array<string|int, mixed>
- This item needs additional attributes.
- getDropDown() : string
- No drop-down here.
- getIndex() : int
- Position relative to others, live search should be very right.
- getItem() : string
- Render search field.
- hasDropDown() : bool
- This item has no drop-down.
- setRequest() : void
- getBackendUser() : BackendUserAuthentication
Methods
__construct()
public
__construct(ModuleProvider $moduleProvider, BackendViewFactory $backendViewFactory) : mixed
Parameters
- $moduleProvider : ModuleProvider
- $backendViewFactory : BackendViewFactory
checkAccess()
Checks whether the user has access to this toolbar item.
public
checkAccess() : bool
Live search depends on the list module and only available when that module is allowed.
Return values
bool —TRUE if user has access, FALSE if not
getAdditionalAttributes()
This item needs additional attributes.
public
getAdditionalAttributes() : array<string|int, mixed>
Return values
array<string|int, mixed> —List item HTML attributes
getDropDown()
No drop-down here.
public
getDropDown() : string
Return values
string —Drop down HTML
getIndex()
Position relative to others, live search should be very right.
public
getIndex() : int
Return values
int —0 .. 100
getItem()
Render search field.
public
getItem() : string
Return values
string —Toolbar item HTML
hasDropDown()
This item has no drop-down.
public
hasDropDown() : bool
Return values
boolsetRequest()
public
setRequest(ServerRequestInterface $request) : void
Parameters
- $request : ServerRequestInterface
getBackendUser()
protected
getBackendUser() : BackendUserAuthentication