Export
in package
Export support class
Tags
Table of Contents
- $activeFormats : array<string|int, mixed>
- Property to cache active formats (initialized to empty array , populated later)
- $exportConfig : Config
- Export-specific configuration
- $mainConfig : Config
- Main VuFind configuration
- __construct() : mixed
- Constructor
- getActiveFormats() : array<string|int, mixed>
- Get active export formats for the given context.
- getBulkExportType() : string
- Get the bulk export type for the specified export format.
- getBulkUrl() : string
- Get the URL for bulk export.
- getFormatsForRecord() : array<string|int, mixed>
- Get an array of strings representing formats in which a specified record's data may be exported (empty if none). Legal values: "BibTeX", "EndNote", "MARC", "MARCXML", "RDF", "RefWorks".
- getFormatsForRecords() : array<string|int, mixed>
- Same return value as getFormatsForRecord(), but filtered to reflect bulk export configuration and to list only values supported by a set of records.
- getHeaders() : array<string|int, mixed>
- Get headers for the requested format.
- getLabelForFormat() : string
- Get the display label for the specified export format.
- getPostField() : string
- Get the export POST field name.
- getRedirectUrl() : string
- Build callback URL for export.
- getTargetWindow() : string
- Get the export target window.
- needsRedirect() : bool
- Does the requested format require a redirect?
- processGroup() : string
- Convert an array of individual records into a single string for display.
- recordSupportsFormat() : bool
- Does the specified record support the specified export format?
Properties
$activeFormats
Property to cache active formats (initialized to empty array , populated later)
protected
array<string|int, mixed>
$activeFormats
= []
$exportConfig
Export-specific configuration
protected
Config
$exportConfig
$mainConfig
Main VuFind configuration
protected
Config
$mainConfig
Methods
__construct()
Constructor
public
__construct(Config $mainConfig, Config $exportConfig) : mixed
Parameters
- $mainConfig : Config
-
Main VuFind configuration
- $exportConfig : Config
-
Export-specific configuration
Return values
mixed —getActiveFormats()
Get active export formats for the given context.
public
getActiveFormats([string $context = 'record' ]) : array<string|int, mixed>
Parameters
- $context : string = 'record'
-
Export context (i.e. record, bulk)
Return values
array<string|int, mixed> —getBulkExportType()
Get the bulk export type for the specified export format.
public
getBulkExportType(string $format) : string
Parameters
- $format : string
-
Format identifier
Return values
string —getBulkUrl()
Get the URL for bulk export.
public
getBulkUrl(PhpRenderer $view, string $format, array<string|int, mixed> $ids) : string
Parameters
- $view : PhpRenderer
-
View object (needed for URL generation)
- $format : string
-
Export format being used
- $ids : array<string|int, mixed>
-
Array of IDs to export (in source|id format)
Return values
string —getFormatsForRecord()
Get an array of strings representing formats in which a specified record's data may be exported (empty if none). Legal values: "BibTeX", "EndNote", "MARC", "MARCXML", "RDF", "RefWorks".
public
getFormatsForRecord(AbstractBase $driver) : array<string|int, mixed>
Parameters
- $driver : AbstractBase
-
Record driver
Return values
array<string|int, mixed> —Strings representing export formats.
getFormatsForRecords()
Same return value as getFormatsForRecord(), but filtered to reflect bulk export configuration and to list only values supported by a set of records.
public
getFormatsForRecords(array<string|int, mixed> $drivers) : array<string|int, mixed>
Parameters
- $drivers : array<string|int, mixed>
-
Array of record drivers
Return values
array<string|int, mixed> —getHeaders()
Get headers for the requested format.
public
getHeaders(string $format) : array<string|int, mixed>
Parameters
- $format : string
-
Selected export format
Return values
array<string|int, mixed> —getLabelForFormat()
Get the display label for the specified export format.
public
getLabelForFormat(string $format) : string
Parameters
- $format : string
-
Format identifier
Return values
string —getPostField()
Get the export POST field name.
public
getPostField(string $format) : string
Parameters
- $format : string
-
Format identifier
Return values
string —getRedirectUrl()
Build callback URL for export.
public
getRedirectUrl(string $format, string $callback) : string
Parameters
- $format : string
-
Export format being used
- $callback : string
-
Callback URL for retrieving record(s)
Return values
string —getTargetWindow()
Get the export target window.
public
getTargetWindow(string $format) : string
Parameters
- $format : string
-
Format identifier
Return values
string —needsRedirect()
Does the requested format require a redirect?
public
needsRedirect(string $format) : bool
Parameters
- $format : string
-
Format to check
Return values
bool —processGroup()
Convert an array of individual records into a single string for display.
public
processGroup(string $format, array<string|int, mixed> $parts) : string
Parameters
- $format : string
-
Format of records to process
- $parts : array<string|int, mixed>
-
Multiple records to process
Return values
string —recordSupportsFormat()
Does the specified record support the specified export format?
public
recordSupportsFormat(AbstractBase $driver, string $format) : bool
Parameters
- $driver : AbstractBase
-
Record driver
- $format : string
-
Format to check