VuFind API Documentation

SchemaOrg extends AbstractHelper
in package

View helper for injecting schema.org metadata

Tags
category

VuFind

author

Ere Maijala ere.maijala@helsinki.fi

license

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

link

Wiki

Table of Contents

$enabled  : bool
$htmlAttributes  : HtmlAttributes
__construct()  : mixed
Constructor
getAttributes()  : string
Format schema.org attributes (if enabled).
getLink()  : string
Create a schema.org link tag (if enabled).
getMeta()  : string
Create a schema.org meta tag (if enabled).
getTag()  : string
Get a schema.org tag (if enabled). Note that this only generates an open (or void) tag; if a close tag is required, you will need to add it yourself separately.

Properties

$htmlAttributes

protected HtmlAttributes $htmlAttributes

Methods

__construct()

Constructor

public __construct(HtmlAttributes $htmlAttributes[, bool $enabled = true ]) : mixed
Parameters
$htmlAttributes : HtmlAttributes

HtmlAttributes view helper

$enabled : bool = true

Is schema.org metadata enabled?

Return values
mixed

getAttributes()

Format schema.org attributes (if enabled).

public getAttributes(array<string|int, mixed> $attributes) : string
Parameters
$attributes : array<string|int, mixed>

HTML attributes (in key/value format)

Return values
string

Create a schema.org link tag (if enabled).

public getLink(string $href, string $property[, array<string|int, mixed> $attributes = [] ]) : string
Parameters
$href : string

Link target

$property : string

Property attribute

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

Additional attributes (optional)

Return values
string

getMeta()

Create a schema.org meta tag (if enabled).

public getMeta(string $property, string $content[, array<string|int, mixed> $attributes = [] ]) : string
Parameters
$property : string

Property name

$content : string

Property value

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

Additional attributes (optional)

Return values
string

getTag()

Get a schema.org tag (if enabled). Note that this only generates an open (or void) tag; if a close tag is required, you will need to add it yourself separately.

public getTag(string $tag, array<string|int, mixed> $attributes) : string
Parameters
$tag : string

Tag name

$attributes : array<string|int, mixed>

Tag attributes

Return values
string

Search results