VuFind API Documentation

ThemeGenerator extends AbstractThemeUtility
in package
implements GeneratorInterface Uses ConsoleOutputTrait

Class to generate a new theme from a template and reconfigure VuFind to use it.

Tags
category

VuFind

author

Chris Hallberg challber@villanova.edu

author

Demian Katz demian.katz@villanova.edu

license

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

link

Main Site

Interfaces, Classes, Traits and Enums

GeneratorInterface
Interface shared by theme and mixin generator classes.

Table of Contents

$info  : ThemeInfo
Theme info object
$lastError  : string
Last error message
$outputInterface  : OutputInterface
Output interface.
$pathResolver  : PathResolver
Config file path resolver
__construct()  : mixed
Constructor
configure()  : bool
Configure the specified theme as VuFind's new default theme (and one of the alternatives).
generate()  : bool
Generate a new theme from a template.
getLastError()  : string
Get last error message.
setOutputInterface()  : mixed
Set the output interface. Implements a fluent interface.
writeln()  : mixed
Write a line to the output (if available). Implements a fluent interface.
copyDir()  : bool
Copy the contents of $src into $dest if no matching files already exist.
deleteDir()  : bool
Recursively delete a directory and its contents.
setLastError()  : bool
Set last error message and return a boolean false.

Properties

$outputInterface

Output interface.

protected OutputInterface $outputInterface = null

Methods

configure()

Configure the specified theme as VuFind's new default theme (and one of the alternatives).

public configure(Config $config, string $name) : bool
Parameters
$config : Config

Existing VuFind configuration

$name : string

Theme name to add to configuration.

Return values
bool

generate()

Generate a new theme from a template.

public generate(string $name[, string $themeTemplate = 'local_theme_example' ]) : bool
Parameters
$name : string

Name of theme to generate.

$themeTemplate : string = 'local_theme_example'

Name of template theme

Return values
bool

getLastError()

Get last error message.

public getLastError() : string
Return values
string

setOutputInterface()

Set the output interface. Implements a fluent interface.

public setOutputInterface(OutputInterface $output) : mixed
Parameters
$output : OutputInterface

Output interface

Return values
mixed

writeln()

Write a line to the output (if available). Implements a fluent interface.

public writeln(string $output) : mixed
Parameters
$output : string

Line to output.

Return values
mixed

copyDir()

Copy the contents of $src into $dest if no matching files already exist.

protected copyDir(string $src, string $dest) : bool
Parameters
$src : string

Source directory

$dest : string

Target directory

Return values
bool

deleteDir()

Recursively delete a directory and its contents.

protected deleteDir(string $path) : bool
Parameters
$path : string

Directory to delete.

Return values
bool

setLastError()

Set last error message and return a boolean false.

protected setLastError(string $error) : bool
Parameters
$error : string

Error message.

Return values
bool

Search results