SearchController
extends AbstractSolrSearch
in package
Redirects the user to the appropriate default VuFind action.
Tags
Table of Contents
- $accessDeniedBehavior : string
- Behavior when access is denied (used unless overridden through permissionBehavior.ini). Valid values are 'promptLogin' and 'exception'.
- $accessPermission : string|bool|null
- Permission that must be granted to access this module (false for no restriction, null to use configured default (which is usually the same as false)).
- $rememberSearch : bool
- Should we remember the search for breadcrumb purposes?
- $saveToHistory : bool
- Should we save searches to history?
- $searchClassId : string
- Search class family to use.
- $serviceLocator : ContainerInterface
- Service manager
- $translator : TranslatorInterface
- Translator
- __construct() : mixed
- Constructor
- advancedAction() : ViewModel
- Handle an advanced search
- captcha() : Captcha
- collectionfacetlistAction() : mixed
- Show facet list for Solr-driven collections.
- confirm() : mixed
- Confirm an action.
- dbUpgrade() : DbUpgrade
- editmemoryAction() : mixed
- Edit search memory action.
- emailAction() : mixed
- Email action - Allows the email form to appear.
- facetListAction() : mixed
- Returns a list of all items associated with one facet for the lightbox
- flashMessenger() : FlashMessenger
- followup() : Followup
- forceLogin() : mixed
- Redirect the user to the login screen.
- forwardTo() : mixed
- Convenience method to make invocation of forward() helper less verbose.
- getAccessPermission() : string|bool|null
- Getter for access permission (string for required permission name, false for no permission required, null to use default permission).
- getConfig() : Config
- Get a VuFind configuration.
- getDbService() : T
- Get a database service object.
- getILS() : Connection
- Get the ILS connection.
- getOptionsForClass() : Options
- Get proper options file for search class
- getRecordCache() : Cache
- Get the record cache
- getRecordLoader() : Loader
- Get the record loader
- getRecordRouter() : Router
- Get the record router.
- getRequest() : Request
- Get request object
- getSearchMemory() : Memory
- Get the search memory
- getServerUrl() : string
- Get the full URL to one of VuFind's routes.
- getService() : T
- Retrieve a service
- getTable() : Gateway
- Get a database table object.
- getTranslator() : TranslatorInterface
- Get translator object.
- getTranslatorLocale() : string
- Get the locale from the translator.
- historyAction() : mixed
- Handle search history display && purge
- holds() : Holds
- homeAction() : mixed
- Home action
- ILLRequests() : ILLRequests
- ilsRecords() : IlsRecords
- newitemAction() : mixed
- New item search form
- newitemresultsAction() : mixed
- New item result list
- newItems() : NewItems
- opensearchAction() : Response
- Handle OpenSearch.
- permission() : Permission
- renewals() : Renewals
- reserves() : Reserves
- reservesAction() : mixed
- Course reserves
- reservesfacetlistAction() : mixed
- Show facet list for Solr-driven reserves.
- reservesresultsAction() : mixed
- Show results of reserves search.
- reservessearchAction() : mixed
- Show search form for Solr-driven reserves.
- resultsAction() : mixed
- Results action.
- resultScroller() : ResultScroller
- setAccessPermission() : void
- Getter for access permission.
- setTranslator() : TranslatorAwareInterface
- Set a translator
- storageRetrievalRequests() : StorageRetrievalRequests
- suggestAction() : Response
- Provide OpenSearch suggestions as specified at http://www.opensearch.org/Specifications/OpenSearch/Extensions/Suggestions/1.0
- translate() : string
- Translate a string (or string-castable object)
- translateWithPrefix() : string
- Translate a string (or string-castable object) using a prefix, or without the prefix if a prefixed translation is not found.
- validateAccessPermission() : void
- Use preDispatch event to block access when appropriate.
- versionsAction() : mixed
- Show results of versions search.
- addFacetDetailsToView() : void
- Set up facet details in the view (for use in advanced search and similar).
- attachDefaultListeners() : void
- Register the default events for this controller
- catalogLogin() : bool|array<string|int, mixed>|ViewModel
- Does the user have catalog credentials available? Returns associative array of patron data if so, otherwise forwards to appropriate login prompt and returns false. If there is an ILS exception, a flash message is added and a newly created ViewModel is returned.
- clearFollowupUrl() : void
- Sometimes we need to unset the followup to trigger default behaviors
- commentsEnabled() : bool
- Are comments enabled?
- createEmailViewModel() : ViewModel
- Create a new ViewModel to use as an email form.
- createViewModel() : ViewModel
- Create a new ViewModel.
- disableSessionWrites() : void
- Prevent session writes -- this is designed to be called prior to time- consuming AJAX operations to help reduce the odds of a timing-related bug that causes the wrong version of session data to be written to disk (see VUFIND-716 for more details).
- extractTextDomain() : array<string|int, mixed>
- Given a translation string with or without a text domain, return an array with the raw string and the text domain separated.
- formWasSubmitted() : bool
- Check to see if a form was submitted from its post value Also validate the Captcha, if it's activated
- getActiveRecommendationSettings() : array<string|int, mixed>
- Get active recommendation module settings
- getAdvancedHierarchicalFacetsSortOptions() : array<string|int, mixed>
- Get an array of hierarchical facet sort options for Advanced search
- getAllRangeSettings() : array<string|int, mixed>
- Get all active range facets:
- getAndClearFollowupUrl() : string
- Retrieve a referer to keep post-login redirect pointing to an appropriate location.
- getAuthManager() : Manager
- Get the account manager object.
- getAuthorizationService() : AuthorizationService
- Get the authorization service (note that we're doing this on-demand rather than through injection with the AuthorizationServiceAwareInterface to minimize expensive initialization when authorization is not needed.
- getDateRangeSettings() : array<string|int, mixed>
- Get the current settings for the date range facets, if set:
- getDebugTranslation() : string
- Build a debug-mode translation
- getFullDateRangeSettings() : array<string|int, mixed>
- Get the current settings for the full date range facets, if set:
- getGenericRangeSettings() : array<string|int, mixed>
- Get the current settings for the generic range facets, if set:
- getHierarchicalFacets() : array<string|int, mixed>
- Get an array of hierarchical facets
- getIllustrationSettings() : array<string|int, mixed>
- Get the possible legal values for the illustration limit radio buttons.
- getILSAuthenticator() : ILSAuthenticator
- Get the ILS authenticator.
- getILSLoginMethod() : string
- What login method does the ILS use (password, email, vufind)
- getILSLoginSettings() : array<string|int, mixed>
- Get settings required for displaying the catalog login form
- getNumericRangeSettings() : array<string|int, mixed>
- Get the current settings for the numeric range facets, if set:
- getRangeFieldList() : array<string|int, mixed>
- Get the range facet configurations from the specified config section and filter them appropriately.
- getRangeSettings() : array<string|int, mixed>
- Get the current settings for the specified range facet, if it is set:
- getRecordTabManager() : TabManager
- Get the tab configuration for this controller.
- getRedirectForRecord() : Response
- Get a redirection response to a single record
- getRefreshResponse() : Response
- Construct an HTTP 205 (refresh) response. Useful for reporting success in the lightbox without actually rendering content.
- getResultsManager() : PluginManager
- Convenience method for accessing results
- getRssSearchResponse() : ResponseInterface
- Support method for getSearchResultsView() -- return the search results reformatted as an RSS feed.
- getSearchResultsView() : ResponseInterface|ViewModel
- Perform a search and send results to a results view
- getSearchSetupCallback() : mixed
- Get a callback for setting up a search (or null if callback is unnecessary).
- getUser() : UserEntityInterface|null
- Get the user object if logged in, false otherwise.
- getViewRenderer() : RendererInterface
- Get the view renderer
- hasFollowupUrl() : bool
- Checks if a followup url is set
- inLightbox() : bool
- Are we currently in a lightbox context?
- isLocalUrl() : bool
- Is the provided URL local to this instance?
- listsEnabled() : bool
- Are lists enabled?
- normalizeUrlForComparison() : string
- Normalize the referer URL so that inconsistencies in protocol and trailing slashes do not break comparisons.
- parseSpecialFacetsSetting() : array<string|int, mixed>
- Parse the "special facets" setting.
- processAdvancedCheckboxes() : array<string|int, mixed>
- Process the checkbox setting from special facets.
- processAdvancedFacets() : array<string|int, mixed>
- Process the facets to be used as limits on the Advanced Search screen.
- processJumpTo() : bool|Response
- Process the jumpto parameter -- either redirect to a specific record and return view model, or ignore the parameter and return false.
- processJumpToOnlyResult() : bool|Response
- Process jump to record if there is only one result.
- redirectToLegalSearchPage() : mixed
- If the search backend has thrown a "deep paging" exception, we should show a flash message and redirect the user to a legal page.
- redirectToSavedSearch() : mixed
- Given a saved search ID, redirect the user to the appropriate place.
- rememberSearch() : void
- Store the URL of the provided search (if appropriate).
- restoreAdvancedSearch() : bool|object
- Either assign the requested search object to the view or display a flash message indicating why the operation failed.
- resultScrollerActive() : bool
- Is the result scroller active?
- retrieveSearchSecurely() : SearchEntityInterface|null
- Get a saved search, enforcing user ownership. Returns row if found, null otherwise.
- sanitizeTranslationKey() : string
- Make sure there are not any illegal characters in the translation key that might prevent successful lookup in language files.
- saveSearchToHistory() : void
- Save a search to the history in the database.
- setFollowupUrlToReferer() : void
- Store a referer (if appropriate) to keep post-login redirect pointing to an appropriate location. This is used when the user clicks the log in link from an arbitrary page or when a password is mistyped; separate logic is used for storing followup information when VuFind forces the user to log in from another context.
- tagsEnabled() : bool
- Are tags enabled?
- translateString() : string
- Get translation for a string
Properties
$accessDeniedBehavior
Behavior when access is denied (used unless overridden through permissionBehavior.ini). Valid values are 'promptLogin' and 'exception'.
protected
string
$accessDeniedBehavior
= null
Leave at null to use the defaultDeniedControllerBehavior set in permissionBehavior.ini (normally 'promptLogin' unless changed).
$accessPermission
Permission that must be granted to access this module (false for no restriction, null to use configured default (which is usually the same as false)).
protected
string|bool|null
$accessPermission
= null
$rememberSearch
Should we remember the search for breadcrumb purposes?
protected
bool
$rememberSearch
= true
$saveToHistory
Should we save searches to history?
protected
bool
$saveToHistory
= true
$searchClassId
Search class family to use.
protected
string
$searchClassId
= 'Solr'
$serviceLocator
Service manager
protected
ContainerInterface
$serviceLocator
$translator
Translator
protected
TranslatorInterface
$translator
= null
Methods
__construct()
Constructor
public
__construct(ServiceLocatorInterface $sm) : mixed
Parameters
- $sm : ServiceLocatorInterface
-
Service locator
Return values
mixed —advancedAction()
Handle an advanced search
public
advancedAction() : ViewModel
Return values
ViewModel —captcha()
public
captcha() : Captcha
Captcha plugin
Return values
Captcha —collectionfacetlistAction()
Show facet list for Solr-driven collections.
public
collectionfacetlistAction() : mixed
Return values
mixed —confirm()
Confirm an action.
public
confirm(string $title, string $yesTarget, string $noTarget[, string|array<string|int, mixed> $messages = [] ][, array<string|int, mixed> $extras = [] ]) : mixed
Parameters
- $title : string
-
Title of confirm dialog
- $yesTarget : string
-
Form target for "confirm" action
- $noTarget : string
-
Form target for "cancel" action
- $messages : string|array<string|int, mixed> = []
-
Info messages for confirm dialog
- $extras : array<string|int, mixed> = []
-
Extra details to include in form
Return values
mixed —dbUpgrade()
public
dbUpgrade() : DbUpgrade
DbUpgrade plugin
Return values
DbUpgrade —editmemoryAction()
Edit search memory action.
public
editmemoryAction() : mixed
Return values
mixed —emailAction()
Email action - Allows the email form to appear.
public
emailAction() : mixed
Return values
mixed —facetListAction()
Returns a list of all items associated with one facet for the lightbox
public
facetListAction() : mixed
Parameters: facet The facet to retrieve searchParams Facet search params from $results->getUrlQuery()->getParams()
Return values
mixed —flashMessenger()
public
flashMessenger() : FlashMessenger
FlashMessenger plugin
Return values
FlashMessenger —followup()
public
followup() : Followup
Followup plugin
Return values
Followup —forceLogin()
Redirect the user to the login screen.
public
forceLogin([string $msg = null ][, array<string|int, mixed> $extras = [] ][, bool $forward = true ]) : mixed
Parameters
- $msg : string = null
-
Flash message to display on login screen
- $extras : array<string|int, mixed> = []
-
Associative array of extra fields to store
- $forward : bool = true
-
True to forward, false to redirect
Return values
mixed —forwardTo()
Convenience method to make invocation of forward() helper less verbose.
public
forwardTo(string $controller, string $action[, array<string|int, mixed> $params = [] ]) : mixed
Parameters
- $controller : string
-
Controller to invoke
- $action : string
-
Action to invoke
- $params : array<string|int, mixed> = []
-
Extra parameters for the RouteMatch object (no need to provide action here, since $action takes care of that)
Return values
mixed —getAccessPermission()
Getter for access permission (string for required permission name, false for no permission required, null to use default permission).
public
getAccessPermission() : string|bool|null
Return values
string|bool|null —getConfig()
Get a VuFind configuration.
public
getConfig([string $id = 'config' ]) : Config
Parameters
- $id : string = 'config'
-
Configuration identifier (default = main VuFind config)
Return values
Config —getDbService()
Get a database service object.
public
getDbService(class-string<\VuFind\Controller\T> $name) : T
Parameters
- $name : class-string<\VuFind\Controller\T>
-
Name of service to retrieve
Tags
Return values
T —getILS()
Get the ILS connection.
public
getILS() : Connection
Return values
Connection —getOptionsForClass()
Get proper options file for search class
public
getOptionsForClass() : Options
Return values
Options —getRecordCache()
Get the record cache
public
getRecordCache() : Cache
Return values
Cache —getRecordLoader()
Get the record loader
public
getRecordLoader() : Loader
Return values
Loader —getRecordRouter()
Get the record router.
public
getRecordRouter() : Router
Return values
Router —getRequest()
Get request object
public
getRequest() : Request
Return values
Request —getSearchMemory()
Get the search memory
public
getSearchMemory() : Memory
Return values
Memory —getServerUrl()
Get the full URL to one of VuFind's routes.
public
getServerUrl([bool|string $route = true ]) : string
Parameters
- $route : bool|string = true
-
Boolean true for current URL, otherwise name of route to render as URL
Return values
string —getService()
Retrieve a service
public
getService(class-string<\VuFind\Service\T> $name) : T
Parameters
- $name : class-string<\VuFind\Service\T>
-
Name of service to retrieve
Tags
Return values
T —getTable()
Get a database table object.
public
getTable(string $table) : Gateway
Parameters
- $table : string
-
Name of table to retrieve
Return values
Gateway —getTranslator()
Get translator object.
public
getTranslator() : TranslatorInterface
Return values
TranslatorInterface —getTranslatorLocale()
Get the locale from the translator.
public
getTranslatorLocale([string $default = 'en' ]) : string
Parameters
- $default : string = 'en'
-
Default to use if translator absent.
Return values
string —historyAction()
Handle search history display && purge
public
historyAction() : mixed
Return values
mixed —holds()
public
holds() : Holds
Holds plugin
Return values
Holds —homeAction()
Home action
public
homeAction() : mixed
Return values
mixed —ILLRequests()
public
ILLRequests() : ILLRequests
ILLRequests plugin
Return values
ILLRequests —ilsRecords()
public
ilsRecords() : IlsRecords
IlsRecords plugin
Return values
IlsRecords —newitemAction()
New item search form
public
newitemAction() : mixed
Return values
mixed —newitemresultsAction()
New item result list
public
newitemresultsAction() : mixed
Return values
mixed —newItems()
public
newItems() : NewItems
NewItems plugin
Return values
NewItems —opensearchAction()
Handle OpenSearch.
public
opensearchAction() : Response
Return values
Response —permission()
public
permission() : Permission
Permission plugin
Return values
Permission —renewals()
public
renewals() : Renewals
Renewals plugin
Return values
Renewals —reserves()
public
reserves() : Reserves
Reserves plugin
Return values
Reserves —reservesAction()
Course reserves
public
reservesAction() : mixed
Return values
mixed —reservesfacetlistAction()
Show facet list for Solr-driven reserves.
public
reservesfacetlistAction() : mixed
Return values
mixed —reservesresultsAction()
Show results of reserves search.
public
reservesresultsAction() : mixed
Return values
mixed —reservessearchAction()
Show search form for Solr-driven reserves.
public
reservessearchAction() : mixed
Return values
mixed —resultsAction()
Results action.
public
resultsAction() : mixed
Return values
mixed —resultScroller()
public
resultScroller() : ResultScroller
ResultScroller plugin
Return values
ResultScroller —setAccessPermission()
Getter for access permission.
public
setAccessPermission(string|false $ap) : void
Parameters
- $ap : string|false
-
Permission to require for access to the controller (false for no requirement)
Return values
void —setTranslator()
Set a translator
public
setTranslator(TranslatorInterface $translator) : TranslatorAwareInterface
Parameters
- $translator : TranslatorInterface
-
Translator
Return values
TranslatorAwareInterface —storageRetrievalRequests()
public
storageRetrievalRequests() : StorageRetrievalRequests
StorageRetrievalRequests plugin
Return values
StorageRetrievalRequests —suggestAction()
Provide OpenSearch suggestions as specified at http://www.opensearch.org/Specifications/OpenSearch/Extensions/Suggestions/1.0
public
suggestAction() : Response
Return values
Response —translate()
Translate a string (or string-castable object)
public
translate(string|object|array<string|int, mixed> $target[, array<string|int, mixed> $tokens = [] ][, string $default = null ][, bool $useIcuFormatter = false ][, array<string|int, string> $fallbackDomains = [] ]) : string
Parameters
- $target : string|object|array<string|int, mixed>
-
String to translate or an array of text domain and string to translate
- $tokens : array<string|int, mixed> = []
-
Tokens to inject into the translated string
- $default : string = null
-
Default value to use if no translation is found (null for no default).
- $useIcuFormatter : bool = false
-
Should we use an ICU message formatter instead of the default behavior?
- $fallbackDomains : array<string|int, string> = []
-
Text domains to check if no match is found in the domain specified in $target
Return values
string —translateWithPrefix()
Translate a string (or string-castable object) using a prefix, or without the prefix if a prefixed translation is not found.
public
translateWithPrefix(string $prefix, string|object|array<string|int, mixed> $target[, array<string|int, mixed> $tokens = [] ][, string $default = null ][, bool $useIcuFormatter = false ][, array<string|int, string> $fallbackDomains = [] ]) : string
Parameters
- $prefix : string
-
Translation key prefix
- $target : string|object|array<string|int, mixed>
-
String to translate or an array of text domain and string to translate
- $tokens : array<string|int, mixed> = []
-
Tokens to inject into the translated string
- $default : string = null
-
Default value to use if no translation is found (null for no default).
- $useIcuFormatter : bool = false
-
Should we use an ICU message formatter instead of the default behavior?
- $fallbackDomains : array<string|int, string> = []
-
Text domains to check if no match is found in the domain specified in $target
Return values
string —validateAccessPermission()
Use preDispatch event to block access when appropriate.
public
validateAccessPermission(MvcEvent $e) : void
Parameters
- $e : MvcEvent
-
Event object
Return values
void —versionsAction()
Show results of versions search.
public
versionsAction() : mixed
Return values
mixed —addFacetDetailsToView()
Set up facet details in the view (for use in advanced search and similar).
protected
addFacetDetailsToView(ViewModel $view[, string $list = 'Advanced' ]) : void
Parameters
- $view : ViewModel
-
View model to update
- $list : string = 'Advanced'
-
Name of facet list to retrieve
Return values
void —attachDefaultListeners()
Register the default events for this controller
protected
attachDefaultListeners() : void
Return values
void —catalogLogin()
Does the user have catalog credentials available? Returns associative array of patron data if so, otherwise forwards to appropriate login prompt and returns false. If there is an ILS exception, a flash message is added and a newly created ViewModel is returned.
protected
catalogLogin() : bool|array<string|int, mixed>|ViewModel
Return values
bool|array<string|int, mixed>|ViewModel —clearFollowupUrl()
Sometimes we need to unset the followup to trigger default behaviors
protected
clearFollowupUrl() : void
Return values
void —commentsEnabled()
Are comments enabled?
protected
commentsEnabled() : bool
Return values
bool —createEmailViewModel()
Create a new ViewModel to use as an email form.
protected
createEmailViewModel([array<string|int, mixed> $params = null ][, string $defaultSubject = null ]) : ViewModel
Parameters
- $params : array<string|int, mixed> = null
-
Parameters to pass to ViewModel constructor.
- $defaultSubject : string = null
-
Default subject line to use.
Return values
ViewModel —createViewModel()
Create a new ViewModel.
protected
createViewModel([array<string|int, mixed> $params = null ]) : ViewModel
Parameters
- $params : array<string|int, mixed> = null
-
Parameters to pass to ViewModel constructor.
Return values
ViewModel —disableSessionWrites()
Prevent session writes -- this is designed to be called prior to time- consuming AJAX operations to help reduce the odds of a timing-related bug that causes the wrong version of session data to be written to disk (see VUFIND-716 for more details).
protected
disableSessionWrites() : void
Return values
void —extractTextDomain()
Given a translation string with or without a text domain, return an array with the raw string and the text domain separated.
protected
extractTextDomain(string|object|array<string|int, mixed> $target) : array<string|int, mixed>
Parameters
- $target : string|object|array<string|int, mixed>
-
String to translate or an array of text domain and string to translate
Return values
array<string|int, mixed> —formWasSubmitted()
Check to see if a form was submitted from its post value Also validate the Captcha, if it's activated
protected
formWasSubmitted([string|array<string|int, string>|null $submitElements = null ][, bool $useCaptcha = false ]) : bool
Parameters
- $submitElements : string|array<string|int, string>|null = null
-
Name of the post field(s) to check to indicate a form submission (or null for default)
- $useCaptcha : bool = false
-
Are we using captcha in this situation?
Return values
bool —getActiveRecommendationSettings()
Get active recommendation module settings
protected
getActiveRecommendationSettings() : array<string|int, mixed>
Return values
array<string|int, mixed> —getAdvancedHierarchicalFacetsSortOptions()
Get an array of hierarchical facet sort options for Advanced search
protected
getAdvancedHierarchicalFacetsSortOptions(string $config) : array<string|int, mixed>
Parameters
- $config : string
-
Name of facet configuration file to load.
Return values
array<string|int, mixed> —getAllRangeSettings()
Get all active range facets:
protected
getAllRangeSettings(array<string|int, mixed> $specialFacets[, object $savedSearch = false ][, string $config = 'facets' ]) : array<string|int, mixed>
Parameters
- $specialFacets : array<string|int, mixed>
-
Special facet setting (in parsed format)
- $savedSearch : object = false
-
Saved search object (false if none)
- $config : string = 'facets'
-
Name of config file
Return values
array<string|int, mixed> —getAndClearFollowupUrl()
Retrieve a referer to keep post-login redirect pointing to an appropriate location.
protected
getAndClearFollowupUrl([bool $checkRedirect = false ]) : string
Unset the followup before returning.
Parameters
- $checkRedirect : bool = false
-
Whether the query should be checked for param 'redirect'
Return values
string —getAuthManager()
Get the account manager object.
protected
getAuthManager() : Manager
Return values
Manager —getAuthorizationService()
Get the authorization service (note that we're doing this on-demand rather than through injection with the AuthorizationServiceAwareInterface to minimize expensive initialization when authorization is not needed.
protected
getAuthorizationService() : AuthorizationService
Return values
AuthorizationService —getDateRangeSettings()
Get the current settings for the date range facets, if set:
protected
getDateRangeSettings([object $savedSearch = false ][, string $config = 'facets' ][, array<string|int, mixed> $filter = [] ]) : array<string|int, mixed>
Parameters
- $savedSearch : object = false
-
Saved search object (false if none)
- $config : string = 'facets'
-
Name of config file
- $filter : array<string|int, mixed> = []
-
List of fields to include (if empty, all fields will be returned)
Return values
array<string|int, mixed> —getDebugTranslation()
Build a debug-mode translation
protected
getDebugTranslation(string $domain, string $str, array<string|int, mixed> $tokens) : string
Parameters
- $domain : string
-
Text domain
- $str : string
-
String to translate
- $tokens : array<string|int, mixed>
-
Tokens to inject into the translated string
Return values
string —getFullDateRangeSettings()
Get the current settings for the full date range facets, if set:
protected
getFullDateRangeSettings([object $savedSearch = false ][, string $config = 'facets' ][, array<string|int, mixed> $filter = [] ]) : array<string|int, mixed>
Parameters
- $savedSearch : object = false
-
Saved search object (false if none)
- $config : string = 'facets'
-
Name of config file
- $filter : array<string|int, mixed> = []
-
List of fields to include (if empty, all fields will be returned)
Return values
array<string|int, mixed> —getGenericRangeSettings()
Get the current settings for the generic range facets, if set:
protected
getGenericRangeSettings([object $savedSearch = false ][, string $config = 'facets' ][, array<string|int, mixed> $filter = [] ]) : array<string|int, mixed>
Parameters
- $savedSearch : object = false
-
Saved search object (false if none)
- $config : string = 'facets'
-
Name of config file
- $filter : array<string|int, mixed> = []
-
List of fields to include (if empty, all fields will be returned)
Return values
array<string|int, mixed> —getHierarchicalFacets()
Get an array of hierarchical facets
protected
getHierarchicalFacets(string $config) : array<string|int, mixed>
Parameters
- $config : string
-
Name of facet configuration file to load.
Return values
array<string|int, mixed> —Facets
getIllustrationSettings()
Get the possible legal values for the illustration limit radio buttons.
protected
getIllustrationSettings([object $savedSearch = false ]) : array<string|int, mixed>
Parameters
- $savedSearch : object = false
-
Saved search object (false if none)
Return values
array<string|int, mixed> —Legal options, with selected value flagged.
getILSAuthenticator()
Get the ILS authenticator.
protected
getILSAuthenticator() : ILSAuthenticator
Return values
ILSAuthenticator —getILSLoginMethod()
What login method does the ILS use (password, email, vufind)
protected
getILSLoginMethod([string $target = '' ]) : string
Parameters
- $target : string = ''
-
Login target (MultiILS only)
Return values
string —getILSLoginSettings()
Get settings required for displaying the catalog login form
protected
getILSLoginSettings() : array<string|int, mixed>
Return values
array<string|int, mixed> —getNumericRangeSettings()
Get the current settings for the numeric range facets, if set:
protected
getNumericRangeSettings([object $savedSearch = false ][, string $config = 'facets' ][, array<string|int, mixed> $filter = [] ]) : array<string|int, mixed>
Parameters
- $savedSearch : object = false
-
Saved search object (false if none)
- $config : string = 'facets'
-
Name of config file
- $filter : array<string|int, mixed> = []
-
List of fields to include (if empty, all fields will be returned)
Return values
array<string|int, mixed> —getRangeFieldList()
Get the range facet configurations from the specified config section and filter them appropriately.
protected
getRangeFieldList(string $config, string $section, array<string|int, mixed> $filter) : array<string|int, mixed>
Parameters
- $config : string
-
Name of config file
- $section : string
-
Configuration section to check
- $filter : array<string|int, mixed>
-
List of fields to include (if empty, all fields will be returned)
Return values
array<string|int, mixed> —getRangeSettings()
Get the current settings for the specified range facet, if it is set:
protected
getRangeSettings(array<string|int, mixed> $fields, string $type[, object $savedSearch = false ]) : array<string|int, mixed>
Parameters
- $fields : array<string|int, mixed>
-
Fields to check
- $type : string
-
Type of range to include in return value
- $savedSearch : object = false
-
Saved search object (false if none)
Return values
array<string|int, mixed> —getRecordTabManager()
Get the tab configuration for this controller.
protected
getRecordTabManager() : TabManager
Return values
TabManager —getRedirectForRecord()
Get a redirection response to a single record
protected
getRedirectForRecord(AbstractBase $record[, array<string|int, mixed> $queryParams = [] ]) : Response
Parameters
- $record : AbstractBase
-
Record driver
- $queryParams : array<string|int, mixed> = []
-
Any query parameters
Return values
Response —getRefreshResponse()
Construct an HTTP 205 (refresh) response. Useful for reporting success in the lightbox without actually rendering content.
protected
getRefreshResponse() : Response
Return values
Response —getResultsManager()
Convenience method for accessing results
protected
getResultsManager() : PluginManager
Return values
PluginManager —getRssSearchResponse()
Support method for getSearchResultsView() -- return the search results reformatted as an RSS feed.
protected
getRssSearchResponse( $view) : ResponseInterface
Parameters
Return values
ResponseInterface —getSearchResultsView()
Perform a search and send results to a results view
protected
getSearchResultsView([callable $setupCallback = null ]) : ResponseInterface|ViewModel
Parameters
- $setupCallback : callable = null
-
Optional setup callback that overrides the default one
Return values
ResponseInterface|ViewModel —getSearchSetupCallback()
Get a callback for setting up a search (or null if callback is unnecessary).
protected
getSearchSetupCallback() : mixed
Return values
mixed —getUser()
Get the user object if logged in, false otherwise.
protected
getUser() : UserEntityInterface|null
Return values
UserEntityInterface|null —getViewRenderer()
Get the view renderer
protected
getViewRenderer() : RendererInterface
Return values
RendererInterface —hasFollowupUrl()
Checks if a followup url is set
protected
hasFollowupUrl() : bool
Return values
bool —inLightbox()
Are we currently in a lightbox context?
protected
inLightbox() : bool
Return values
bool —isLocalUrl()
Is the provided URL local to this instance?
protected
isLocalUrl(string $url) : bool
Parameters
- $url : string
-
URL to check
Return values
bool —listsEnabled()
Are lists enabled?
protected
listsEnabled() : bool
Return values
bool —normalizeUrlForComparison()
Normalize the referer URL so that inconsistencies in protocol and trailing slashes do not break comparisons.
protected
normalizeUrlForComparison(string $url) : string
Parameters
- $url : string
-
URL to normalize
Return values
string —parseSpecialFacetsSetting()
Parse the "special facets" setting.
protected
parseSpecialFacetsSetting(string $specialFacets) : array<string|int, mixed>
Parameters
- $specialFacets : string
-
Unparsed string
Return values
array<string|int, mixed> —processAdvancedCheckboxes()
Process the checkbox setting from special facets.
protected
processAdvancedCheckboxes(array<string|int, mixed> $params[, object $savedSearch = false ]) : array<string|int, mixed>
Parameters
- $params : array<string|int, mixed>
-
Parameters to the checkbox setting
- $savedSearch : object = false
-
Saved search object (false if none)
Return values
array<string|int, mixed> —processAdvancedFacets()
Process the facets to be used as limits on the Advanced Search screen.
protected
processAdvancedFacets(array<string|int, mixed> $facetList[, object $searchObject = false ][, array<string|int, mixed> $hierarchicalFacets = [] ][, array<string|int, mixed> $hierarchicalFacetsSortOptions = [] ]) : array<string|int, mixed>
Parameters
- $facetList : array<string|int, mixed>
-
The advanced facet values
- $searchObject : object = false
-
Saved search object (false if none)
- $hierarchicalFacets : array<string|int, mixed> = []
-
Hierarchical facet list (if any)
- $hierarchicalFacetsSortOptions : array<string|int, mixed> = []
-
Hierarchical facet sort options (if any)
Return values
array<string|int, mixed> —Sorted facets, with selected values flagged.
processJumpTo()
Process the jumpto parameter -- either redirect to a specific record and return view model, or ignore the parameter and return false.
protected
processJumpTo(Results $results) : bool|Response
Parameters
- $results : Results
-
Search results object.
Return values
bool|Response —processJumpToOnlyResult()
Process jump to record if there is only one result.
protected
processJumpToOnlyResult(Results $results) : bool|Response
Parameters
- $results : Results
-
Search results object.
Return values
bool|Response —redirectToLegalSearchPage()
If the search backend has thrown a "deep paging" exception, we should show a flash message and redirect the user to a legal page.
protected
redirectToLegalSearchPage(array<string|int, mixed> $request, int $page) : mixed
Parameters
- $request : array<string|int, mixed>
-
Incoming request parameters
- $page : int
-
Legal page number
Return values
mixed —redirectToSavedSearch()
Given a saved search ID, redirect the user to the appropriate place.
protected
redirectToSavedSearch(int $id) : mixed
Parameters
- $id : int
-
ID from search history
Return values
mixed —rememberSearch()
Store the URL of the provided search (if appropriate).
protected
rememberSearch(Results $results) : void
Parameters
- $results : Results
-
Search results object
Return values
void —restoreAdvancedSearch()
Either assign the requested search object to the view or display a flash message indicating why the operation failed.
protected
restoreAdvancedSearch(string $searchId) : bool|object
Parameters
- $searchId : string
-
ID value of a saved advanced search.
Return values
bool|object —Restored search object if found, false otherwise.
resultScrollerActive()
Is the result scroller active?
protected
resultScrollerActive() : bool
Return values
bool —retrieveSearchSecurely()
Get a saved search, enforcing user ownership. Returns row if found, null otherwise.
protected
retrieveSearchSecurely(int $searchId) : SearchEntityInterface|null
Parameters
- $searchId : int
-
Primary key value
Return values
SearchEntityInterface|null —sanitizeTranslationKey()
Make sure there are not any illegal characters in the translation key that might prevent successful lookup in language files.
protected
sanitizeTranslationKey(string $key) : string
Parameters
- $key : string
-
Key to sanitize
Return values
string —Sanitized key
saveSearchToHistory()
Save a search to the history in the database.
protected
saveSearchToHistory(Results $results) : void
Parameters
- $results : Results
-
Search results
Return values
void —setFollowupUrlToReferer()
Store a referer (if appropriate) to keep post-login redirect pointing to an appropriate location. This is used when the user clicks the log in link from an arbitrary page or when a password is mistyped; separate logic is used for storing followup information when VuFind forces the user to log in from another context.
protected
setFollowupUrlToReferer([bool $allowCurrentUrl = true ][, array<string|int, mixed> $extras = [] ]) : void
Parameters
- $allowCurrentUrl : bool = true
-
Whether the current URL is valid for followup
- $extras : array<string|int, mixed> = []
-
Extra data for the followup
Return values
void —tagsEnabled()
Are tags enabled?
protected
tagsEnabled() : bool
Return values
bool —translateString()
Get translation for a string
protected
translateString(string $rawStr[, array<string|int, mixed> $tokens = [] ][, string $default = null ][, string $domain = 'default' ][, bool $useIcuFormatter = false ]) : string
Parameters
- $rawStr : string
-
String to translate
- $tokens : array<string|int, mixed> = []
-
Tokens to inject into the translated string
- $default : string = null
-
Default value to use if no translation is found (null for no default).
- $domain : string = 'default'
-
Text domain (omit for default)
- $useIcuFormatter : bool = false
-
Should we use an ICU message formatter instead of the default behavior?