SimplesearchPlugin
extends Plugin
in package
Table of Contents
Properties
- $collection : Collection
- $query : array<string|int, mixed>
- $query_id : string
Methods
- checkForPermissions() : mixed
- Filter the pages, and return only the pages the user has access to.
- getSubscribedEvents() : array<string|int, mixed>
- onGetPageTemplates() : mixed
- Add page template types. (for Admin plugin)
- onPagesInitialized() : mixed
- Build search results.
- onPluginsInitialized() : mixed
- Enable search only if url matches to the configuration.
- onTwigSiteVariables() : mixed
- Set needed variables to display the search results.
- onTwigTemplatePaths() : mixed
- Add current directory to twig lookup paths.
- matchText() : mixed
- notFound() : bool
Properties
$collection
protected
Collection
$collection
$query
protected
array<string|int, mixed>
$query
$query_id
protected
string
$query_id
Methods
checkForPermissions()
Filter the pages, and return only the pages the user has access to.
public
checkForPermissions(mixed $collection) : mixed
Implementation based on Login Plugin authorizePage() function.
Parameters
- $collection : mixed
getSubscribedEvents()
public
static getSubscribedEvents() : array<string|int, mixed>
Return values
array<string|int, mixed>onGetPageTemplates()
Add page template types. (for Admin plugin)
public
onGetPageTemplates(Event $event) : mixed
Parameters
- $event : Event
onPagesInitialized()
Build search results.
public
onPagesInitialized() : mixed
onPluginsInitialized()
Enable search only if url matches to the configuration.
public
onPluginsInitialized() : mixed
onTwigSiteVariables()
Set needed variables to display the search results.
public
onTwigSiteVariables() : mixed
onTwigTemplatePaths()
Add current directory to twig lookup paths.
public
onTwigTemplatePaths() : mixed
matchText()
private
matchText(mixed $haystack, mixed $needle) : mixed
Parameters
- $haystack : mixed
- $needle : mixed
notFound()
private
notFound(mixed $query, Page $page, mixed $taxonomies) : bool
Parameters
- $query : mixed
- $page : Page
- $taxonomies : mixed