VuFind API Documentation

Auth extends AbstractHelper
in package
implements DbServiceAwareInterface Uses ClassBasedTemplateRendererTrait, DbServiceAwareTrait

Authentication view helper

Tags
category

VuFind

author

Demian Katz demian.katz@villanova.edu

license

http://opensource.org/licenses/gpl-2.0.php GNU General Public License

link

Wiki

Interfaces, Classes, Traits and Enums

DbServiceAwareInterface
Marker interface for classes that depend on the \VuFind\Db\Service\PluginManager

Table of Contents

$dbServiceManager  : PluginManager
Database service plugin manager
$ilsAuthenticator  : ILSAuthenticator
ILS Authenticator
$manager  : Manager
Authentication manager
$templateCache  : array<string|int, mixed>
Cache for found templates
__construct()  : mixed
Constructor
getCreateFields()  : string
Render the create account form fields.
getDbService()  : T
Get a database service object.
getDbServiceManager()  : PluginManager
Get the service plugin manager. Throw an exception if it is missing.
getIdentity()  : IdentityInterface|null
Get the logged-in user's identity (null if not logged in)
getILSPatron()  : array<string|int, mixed>|bool
Get ILS patron record for the currently logged-in user.
getLogin()  : string
Render the login template.
getLoginDesc()  : string
Render the login description template.
getLoginFields()  : string
Render the login form fields.
getLoginTokens()  : array<string|int, mixed>
Get login token data
getManager()  : Manager
Get manager
getNewPasswordForm()  : string
Render the new password form template.
getPasswordRecoveryForm()  : string
Render the password recovery form template.
getUserObject()  : UserEntityInterface|null
Checks whether the user is logged in.
isLoggedIn()  : UserEntityInterface|bool
Checks whether the user is logged in.
setDbServiceManager()  : void
Set the service plugin manager.
getBriefClass()  : string
Helper to grab the end of the class name
getCachedClassTemplate()  : string
Resolve the class template file unless already cached and return the file name.
getTemplateWithClass()  : string
Helper to put the template path and class name together
renderClassTemplate()  : string
Render a template associated with the provided class name, applying to specified context variables.
renderTemplate()  : string
Render a template within an auth module folder.
resolveClassTemplate()  : string
Recursively locate a template that matches the provided class name (or one of its parent classes); throw an exception if no match is found.

Properties

Methods

getCreateFields()

Render the create account form fields.

public getCreateFields([array<string|int, mixed> $context = [] ]) : string
Parameters
$context : array<string|int, mixed> = []

Context for rendering template

Return values
string

getDbService()

Get a database service object.

public getDbService(class-string<\VuFind\Db\Service\T> $name) : T
Parameters
$name : class-string<\VuFind\Db\Service\T>

Name of service to retrieve

Tags
template

T

Return values
T

getIdentity()

Get the logged-in user's identity (null if not logged in)

public getIdentity() : IdentityInterface|null
Return values
IdentityInterface|null

getILSPatron()

Get ILS patron record for the currently logged-in user.

public getILSPatron() : array<string|int, mixed>|bool
Return values
array<string|int, mixed>|bool

Patron array if available, false otherwise.

getLogin()

Render the login template.

public getLogin([array<string|int, mixed> $context = [] ]) : string
Parameters
$context : array<string|int, mixed> = []

Context for rendering template

Return values
string

getLoginDesc()

Render the login description template.

public getLoginDesc([array<string|int, mixed> $context = [] ]) : string
Parameters
$context : array<string|int, mixed> = []

Context for rendering template

Return values
string

getLoginFields()

Render the login form fields.

public getLoginFields([array<string|int, mixed> $context = [] ]) : string
Parameters
$context : array<string|int, mixed> = []

Context for rendering template

Return values
string

getLoginTokens()

Get login token data

public getLoginTokens(int $userId) : array<string|int, mixed>
Parameters
$userId : int

user identifier

Return values
array<string|int, mixed>

getNewPasswordForm()

Render the new password form template.

public getNewPasswordForm([array<string|int, mixed> $context = [] ]) : string
Parameters
$context : array<string|int, mixed> = []

Context for rendering template

Return values
string

getPasswordRecoveryForm()

Render the password recovery form template.

public getPasswordRecoveryForm([array<string|int, mixed> $context = [] ]) : string
Parameters
$context : array<string|int, mixed> = []

Context for rendering template

Return values
string

isLoggedIn()

Checks whether the user is logged in.

public isLoggedIn() : UserEntityInterface|bool
Tags
deprecated

Use getIdentity() or getUserObject() instead.

Return values
UserEntityInterface|bool

Object if user is logged in, false otherwise.

getBriefClass()

Helper to grab the end of the class name

protected getBriefClass(string $className) : string
Parameters
$className : string

Class name to abbreviate

Return values
string

getCachedClassTemplate()

Resolve the class template file unless already cached and return the file name.

protected getCachedClassTemplate(string $template, string $className) : string
Parameters
$template : string

Template path (with %s as class name placeholder)

$className : string

Name of class to apply to template.

Return values
string

getTemplateWithClass()

Helper to put the template path and class name together

protected getTemplateWithClass(string $template, string $className) : string
Parameters
$template : string

Template path (with %s as class name placeholder)

$className : string

Class name to abbreviate

Return values
string

renderClassTemplate()

Render a template associated with the provided class name, applying to specified context variables.

protected renderClassTemplate(string $template, string $className[, array<string|int, mixed> $context = [] ][, bool $throw = true ]) : string
Parameters
$template : string

Template path (with %s as class name placeholder)

$className : string

Name of class to apply to template.

$context : array<string|int, mixed> = []

Context for rendering template

$throw : bool = true

If true (default), an exception is thrown if the template is not found. Otherwise an empty string is returned.

Tags
throws
RuntimeException
Return values
string

renderTemplate()

Render a template within an auth module folder.

protected renderTemplate(string $name[, array<string|int, mixed> $context = [] ]) : string
Parameters
$name : string

Template name to render

$context : array<string|int, mixed> = []

Context for rendering template

Return values
string

resolveClassTemplate()

Recursively locate a template that matches the provided class name (or one of its parent classes); throw an exception if no match is found.

protected resolveClassTemplate(string $template, string $className, ResolverInterface $resolver[, string $topClassName = null ]) : string
Parameters
$template : string

Template path (with %s as class name placeholder)

$className : string

Name of class to apply to template.

$resolver : ResolverInterface

Resolver to use

$topClassName : string = null

Top-level parent class of $className (or null if $className is already the top level; used for recursion only).

Return values
string

Search results