Common functions for importing resources into wikindx
version | 1 |
---|---|
package | wikindx4\core\importexport |
author | Mark Grimshaw |
__construct()
bibliographySelect() : string
string
checkDuplicates(string $noSort, string $title, string $subtitle, string $type) : boolean
If the session variable 'import_ImportDuplicates' is TRUE, the function quits immediately. NoSort, Title, Subtitle and resource type must match.
string
(A word like 'the', 'a' or translated equivalents that is at the start of the raw title)
string
string
string
boolean
TRUE if resource already exists, FALSE if not.getUnrecognisedFields() : array
Follows from prompting for field mapping
author | Mark Grimshaw |
---|
array
1st element is error message or FALSE, 2nd element is array of custom fields, 3rd element is array of unrecognized fieldskeywordSeparator() : string
string
printDuplicates(int $numDiscarded, array $titlesDiscarded) : \string.
author | Mark Grimshaw |
---|
int
Num. resources discarded
array
Titles of discarded resources
\string.
promptFieldNames(array $entries, array $inputTypes, array $map, array $invalidFieldNames, mixed $strings) : array
This allows users to map them to any existing custom fields.
author | Mark Grimshaw |
---|
array
array
array
array
mixed
array|FALSE. Default is FALSE
array
1st element is error message or FALSE, 2nd element is string for displaysplitTitle($title) : array
title / subtitle split is calculated on the session variable 'import_TitleSubtitleSeparator'.
author | Mark Grimshaw |
---|
array
(noSort, title, subtitle)tidyTables()
that do not have resources.
This should be called just once at the end of multiple inserts.
titleSubtitleSeparator() : string
string
writeBibtexKey()
writeCollectionTable(string $title, string $titleShort, string $wkType) : int
string
Collection title
string
Collection short title
string
wikindx resource type
int
Collection IDwriteCreatorTables(array $creators)
array
ordered array of creators
writeImportrawTable(array $rejectedArray, int $bibtexStringId, string $importType)
author | Mark Grimshaw |
---|
array
Rejected input values for this resource
int
ID of the BibTeX string in the bibtex_string table. Default is FALSE
string
Default is FALSE
writeKeywordTables(array $keywords)
array
writePageTable(array $fields, array $values)
writePublisherTable(string $name, string $location, string $wkType) : int
string
Publisher name
string
Publisher location
string
wikindx resource type
int
Publisher IDwriteResourceTable(array $fields, array $values) : int
array
array
int
New resource IdwriteResourceTimestampTable()
author | Mark Grimshaw |
---|
writeResourcecategoryTable(string $categories)
string
Comma-delimited list of category IDs. At the very least, this must comprise '1' (the 'General' category)
writeResourcecustomTable(string $string, int $customId)
string
int
writeResourcemiscTable(array $fields, array $values)
array
array
writeResourcetextTable(string $notes, string $abstract, string $url)
string
string
string
Default is FALSE
writeTagTable() : int
writeUserbibliographyresourceTable(string $bibId)
string
Comma-delimited string of user_bibliography ids
writeYearTable(array $fields, array $values)
$bibConfig
$bibtexKeys
$collection
$collectionMap
$config
$creator
$db
$errors
$form
$html
$keyword
$publisher
$publisherMap
$resourceId
$session
$table
$vars