VuFind API Documentation

ContentPages extends AbstractGeneratorPlugin
in package

Content pages generator plugin

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

$baseUrl  : string
Base URL for site
$config  : Config
Main VuFind configuration (config.ini)
$excludedFiles  : array<string|int, mixed>
Patterns of files to be ignored when searching for content pages
$includedFiles  : array<string|int, mixed>
Patterns of files to be included
$router  : RouteStackInterface
Router
$themeInfo  : ThemeInfo
Theme informations
$verboseMessageCallback  : callable
Verbose message callback
__construct()  : mixed
Constructor
getFrequency()  : string
Get update frequency. Empty string implies that the default from sitemap configuration should be used.
getSitemapName()  : string
Get the name of the sitemap used to create the sitemap file. This will be appended to the configured base name, and may be blank to use the base name without a suffix.
getUrls()  : Generator
Generate urls for the sitemap.
setOptions()  : void
Set plugin options.
supportsVuFindLanguages()  : bool
Whether the URLs generated by the plugin support VuFind's lng parameter
isExcluded()  : bool
Check if the given file should be excluded from sitemap
verboseMsg()  : void
Write a verbose message (if callback is available and configured to do so)

Properties

$config

Main VuFind configuration (config.ini)

protected Config $config

$excludedFiles

Patterns of files to be ignored when searching for content pages

protected array<string|int, mixed> $excludedFiles = [ 'templates/content/content.phtml', // Content main page 'templates/content/markdown.phtml', ]
Tags
see
https://github.com/webmozarts/glob

$includedFiles

Patterns of files to be included

protected array<string|int, mixed> $includedFiles = [['path' => 'templates/content/', 'pattern' => '**/*.phtml'], ['path' => 'templates/content/', 'pattern' => '**/*.md']]
Tags
see
https://github.com/webmozarts/glob

Methods

__construct()

Constructor

public __construct(ThemeInfo $themeInfo, RouteStackInterface $router, Config $config) : mixed
Parameters
$themeInfo : ThemeInfo

Theme info

$router : RouteStackInterface

Router

$config : Config

Main VuFind configuration

Return values
mixed

getFrequency()

Get update frequency. Empty string implies that the default from sitemap configuration should be used.

public getFrequency() : string
Return values
string

getSitemapName()

Get the name of the sitemap used to create the sitemap file. This will be appended to the configured base name, and may be blank to use the base name without a suffix.

public getSitemapName() : string
Return values
string

getUrls()

Generate urls for the sitemap.

public getUrls() : Generator
Return values
Generator

setOptions()

Set plugin options.

public setOptions(array<string|int, mixed> $options) : void
Parameters
$options : array<string|int, mixed>

Options

Return values
void

supportsVuFindLanguages()

Whether the URLs generated by the plugin support VuFind's lng parameter

public supportsVuFindLanguages() : bool
Return values
bool

isExcluded()

Check if the given file should be excluded from sitemap

protected isExcluded(string $filename) : bool
Parameters
$filename : string

Filename

Return values
bool

verboseMsg()

Write a verbose message (if callback is available and configured to do so)

protected verboseMsg(string $msg) : void
Parameters
$msg : string

Message to display

Return values
void

Search results