Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision |
vufind2:record_driver_method_master_list [2013/03/12 16:59] – demiankatz | development:architecture:record_driver_method_master_list [2015/12/11 19:01] – ↷ Page moved from vufind2:record_driver_method_master_list to development:architecture:record_driver_method_master_list demiankatz |
---|
| |
^ Method Name ^ Params ^ Output ^ Description ^ | ^ Method Name ^ Params ^ Output ^ Description ^ |
| addTags | $user (\VuFind\Db\Row\User) | void | Add tags to the record. \\ \\ $user - The user posting the tag \\ \\ $tags - The user-provided tag string | | | addTags | $user (\VuFind\Db\Row\User) | void | Add tags to the record. \\ \\ $user - The user posting the tag \\ \\ $tags - The user-provided tags | |
| ::: | $tags (string) | ::: | ::: | | | ::: | $tags (array) | ::: | ::: | |
| getBreadcrumb | //none// | string Breadcrumb text to represent this record. | Get text that can be displayed to represent this record in breadcrumbs. | | | getBreadcrumb | //none// | string Breadcrumb text to represent this record. | Get text that can be displayed to represent this record in breadcrumbs. | |
| getCitationFormats | //none// | array Strings representing citation formats. | Get an array of strings representing citation formats supported by this record's data (empty if none). For possible legal values, see applicationthemesroothelpersCitation.php. | | | getCitationFormats | //none// | array Strings representing citation formats. | Get an array of strings representing citation formats supported by this record's data (empty if none). For possible legal values, see the Citation view helper. Starting with VuFind 2.3, this list can be filtered using config.ini settings; the unfiltered list should be defined by getSupportedCitationFormats(). | |
| getComments | //none// | array | Get comments associated with this record. | | | getComments | //none// | array | Get comments associated with this record. | |
| getContainingLists | $user_id (int) | array | Get a list of lists containing this record. \\ \\ $user_id - ID of user to load tags from (null for all users) | | | getContainingLists | $user_id (int) | array | Get a list of lists containing this record. \\ \\ $user_id - ID of user to load tags from (null for all users) | |
| ::: | $user_id (int) | ::: | ::: | | | ::: | $user_id (int) | ::: | ::: | |
| getRawData | //none// | mixed | Get the raw data contained in the driver (primarily for use in staff view and autocomplete; avoid using whenever possible). | | | getRawData | //none// | mixed | Get the raw data contained in the driver (primarily for use in staff view and autocomplete; avoid using whenever possible). | |
| getRelated | $types (array) | array | Return an array of related record suggestion objects (implementing the \VuFind\Related\Interface) based on the current record. \\ \\ $types - Array of relationship types to load; each entry should be a partial class name (i.e. 'Similar' or 'Editions') optionally followed by a colon-separated list of parameters to pass to the constructor. If the parameter is set to null instead of an array, default settings will be loaded from config.ini. | | | getRelated | $factory (\VuFind\Related\PluginManager) | array | Return an array of related record suggestion objects (implementing the \VuFind\Related\Interface) based on the current record. \\ \\ $factory - Related module plugin factory \\ \\ $types - Array of relationship types to load; each entry should be a partial class name (i.e. 'Similar' or 'Editions') optionally followed by a colon-separated list of parameters to pass to the constructor. If the parameter is set to null instead of an array, default settings will be loaded from config.ini. | |
| | ::: | $types (array) | ::: | ::: | |
| getResourceSource | //none// | string | Get the source value used to identify resources of this type in the database. | | | getResourceSource | //none// | string | Get the source value used to identify resources of this type in the database. | |
| getSortTitle | //none// | string | Get a sortable title for the record (i.e. no leading articles). | | | getSortTitle | //none// | string | Get a sortable title for the record (i.e. no leading articles). | |
| | getSupportedCitationFormats | //none// | array | //Added in VuFind 2.3// - an unfiltered list of citation formats supported by this record; see getCitationFormats above for more details. | |
| getTags | $list_id (int) | array | Get tags associated with this record. \\ \\ $list_id - ID of list to load tags from (null for all lists) \\ \\ $user_id - ID of user to load tags from (null for all users) \\ \\ $sort - Sort type ('count' or 'tag') | | | getTags | $list_id (int) | array | Get tags associated with this record. \\ \\ $list_id - ID of list to load tags from (null for all lists) \\ \\ $user_id - ID of user to load tags from (null for all users) \\ \\ $sort - Sort type ('count' or 'tag') | |
| ::: | $user_id (int) | ::: | ::: | | | ::: | $user_id (int) | ::: | ::: | |
| ::: | $sort (string) | ::: | ::: | | | ::: | $sort (string) | ::: | ::: | |
| getUniqueID | //none// | string Unique identifier. | Return the unique identifier of this record for retrieving additional information (like tags and user comments) from the external MySQL database. | | | getUniqueID | //none// | string Unique identifier. | Return the unique identifier of this record for retrieving additional information (like tags and user comments) from the external MySQL database. | |
| openURLActive | $area (string) | bool | Does the OpenURL configuration indicate that we should display OpenURLs in the specified context? \\ \\ $area - 'results', 'record' or 'holdings' | | | openURLActive (deprecated) | $area (string) | bool | Does the OpenURL configuration indicate that we should display OpenURLs in the specified context? \\ \\ $area - 'results', 'record' or 'holdings' \\ :!: removed in VuFind 2.5 | |
| replaceURLsWithOpenURL | //none// | bool | Should we display regular URLs when an OpenURL is present? | | | replaceURLsWithOpenURL (deprecated) | //none// | bool | Should we display regular URLs when an OpenURL is present? \\ :!: removed in VuFind 2.5 | |
| saveToFavorites | $params (array) | void | Save this record to the user's favorites. \\ \\ $params - Array with some or all of these keys: <ul> <li>mytags - Unparsed tag string to associate with record (optional)<li> <li>notes - Notes to associate with record (optional)<li> <li>list - ID of list to save record into (omit to create new list)<li> <ul> \\ \\ $user - The user saving the record | | | saveToFavorites | $params (array) | void | Save this record to the user's favorites. \\ \\ $params - Array with some or all of these keys: <ul> <li>mytags - Tag array to associate with record (optional)<li> <li>notes - Notes to associate with record (optional)<li> <li>list - ID of list to save record into (omit to create new list)<li> <ul> \\ \\ $user - The user saving the record | |
| ::: | $user (\VuFind\Db\Row\User) | ::: | ::: | | | ::: | $user (\VuFind\Db\Row\User) | ::: | ::: | |
| setExtraDetail | $key (string) | void | Store a piece of supplemental information in the record driver. \\ \\ $key - Name of stored information \\ \\ $val - Information to store | | | setExtraDetail | $key (string) | void | Store a piece of supplemental information in the record driver. \\ \\ $key - Name of stored information \\ \\ $val - Information to store | |
| setRawData | $data (mixed) | void | Set the raw data to be used by the driver. This must be called after construction but prior to using other methods. The nature of the raw data doesn't matter as long as other driver methods are able to interpret it. Most record drivers in VuFind use an associative array based on the Solr schema. | | | setRawData | $data (mixed) | void | Set the raw data to be used by the driver. This must be called after construction but prior to using other methods. The nature of the raw data doesn't matter as long as other driver methods are able to interpret it. Most record drivers in VuFind use an associative array based on the Solr schema. | |
| supportsAjaxStatus | //none// | bool | Returns true if the record supports real-time AJAX status lookups. | | | supportsAjaxStatus | //none// | bool | Returns true if the record supports real-time AJAX status lookups. | |
| | supportsCoinsOpenUrl | //none// | bool | Returns true if OpenURLs may be used for generating [[http://ocoins.info/|COinS]] from the current record. See also supportsOpenUrl below. //Added in VuFind 2.5.// | |
| | supportsOpenUrl | //none// | bool | Returns true if OpenURLs may be used for linking from the current record. Setting this to false does not suppress the display of COinS (see supportsCoinsOpenUrl). //Added in VuFind 2.5.// | |
| tryMethod | $method (string) | mixed | Try to call the requested method and return null if it is unavailable; this is useful for checking for the existence of get methods for particular types of data without causing fatal errors. \\ \\ $method - Name of method to call. \\ \\ $params - Array of parameters to pass to method. | | | tryMethod | $method (string) | mixed | Try to call the requested method and return null if it is unavailable; this is useful for checking for the existence of get methods for particular types of data without causing fatal errors. \\ \\ $method - Name of method to call. \\ \\ $params - Array of parameters to pass to method. | |
| ::: | $params (array) | ::: | ::: | | | ::: | $params (array) | ::: | ::: | |
| ::: | $holdLogic (\VuFind\ILS\Logic\Holds) | ::: | ::: | | | ::: | $holdLogic (\VuFind\ILS\Logic\Holds) | ::: | ::: | |
| ::: | $titleHoldLogic (\VuFind\ILS\Logic\TitleHolds) | ::: | ::: | | | ::: | $titleHoldLogic (\VuFind\ILS\Logic\TitleHolds) | ::: | ::: | |
| | exportDisabled | $format (string) | bool | Indicate whether or not the specified export format is disallowed by this driver. | |
| getAccessRestrictions | //none// | array | Get access restriction notes for the record. | | | getAccessRestrictions | //none// | array | Get access restriction notes for the record. | |
| getAllRecordLinks | //none// | null/array | Get all record links related to the current record. Each link is returned as array. NB: to use this method you must override it. Format: <code> array( array( 'title' => label_for_title 'value' => link_name 'link' => link_URI ), ... ) <code> | | | getAllRecordLinks | //none// | null/array | Get all record links related to the current record. Each link is returned as array. NB: to use this method you must override it. Format: <code> array( array( 'title' => label_for_title 'value' => link_name 'link' => link_URI ), ... ) <code> | |
| getCleanISSN | //none// | mixed | Get just the base portion of the first listed ISSN (or false if no ISSNs). | | | getCleanISSN | //none// | mixed | Get just the base portion of the first listed ISSN (or false if no ISSNs). | |
| getCleanOCLCNum | //none// | mixed | Get just the first listed OCLC Number (or false if none available). | | | getCleanOCLCNum | //none// | mixed | Get just the first listed OCLC Number (or false if none available). | |
| | getCleanUPC | //none// | mixed | Get just the first listed UPC (or false if none available). | |
| getContainerEndPage | //none// | string | Get the end page of the item that contains this record. | | | getContainerEndPage | //none// | string | Get the end page of the item that contains this record. | |
| getContainerIssue | //none// | string | Get the issue of the item that contains this record (i.e. MARC 773l of a journal). | | | getContainerIssue | //none// | string | Get the issue of the item that contains this record (i.e. MARC 773l of a journal). | |
| getGeneralNotes | //none// | array | Get general notes on the record. | | | getGeneralNotes | //none// | array | Get general notes on the record. | |
| getHierarchyDriver | //none// | \VuFind\Hierarchy\Driver\AbstractBase or bool | Get a hierarchy driver appropriate to the current object. (May be false if disabled/unavailable). | | | getHierarchyDriver | //none// | \VuFind\Hierarchy\Driver\AbstractBase or bool | Get a hierarchy driver appropriate to the current object. (May be false if disabled/unavailable). | |
| getHierarchyPositionsInParents | //none// | array | Get the positions of this item within parent collections. Returns an array of parent ID => sequence number. | | | getHierarchyPositionsInParents | //none// | array | Get the positions of this item within parent collections. Returns an array of parent ID => sequence number. :!: removed in VuFind 2.5; no longer needed | |
| getHierarchyTopID | //none// | array | Get an array of IDs representing tops of hierarchies containing this item | | | getHierarchyTopID | //none// | array | Get an array of IDs representing tops of hierarchies containing this item | |
| getHierarchyTopTitle | //none// | array | Get an array of titles of hierarchies containing this item | | | getHierarchyTopTitle | //none// | array | Get an array of titles of hierarchies containing this item | |
| getHighlightedSnippet | //none// | mixed False if no snippet found, otherwise associative array | Pick one line from the highlighted text (if any) to use as a snippet. | | | getHighlightedSnippet | //none// | mixed False if no snippet found, otherwise associative array | Pick one line from the highlighted text (if any) to use as a snippet. | |
| getHighlightedTitle | //none// | string | Get a highlighted title string, if available. | | | getHighlightedTitle | //none// | string | Get a highlighted title string, if available. | |
| getISBNs | //none// | array | Get an array of all ISBNs associated with the record (may be empty). | | | getHumanReadablePublicationDates | //none// | array | Similar to getPublicationDates() but in some cases returns a human-readable, display-oriented string instead of a value that has been normalized to allow computer processing. Added in VuFind 2.3. | |
| getISSNs | //none// | array | Get an array of all ISSNs associated with the record (may be empty). | | | getImageBasedOpenUrl | //none// | string | When defined, overrides getOpenUrl() for links generated using dynamically-generated OpenURL-based images (see the dynamic_graphic setting in [[..:config.ini]]). // Introduced in VuFind 2.5.// | |
| | getInstitutions | //none// | array | Get an array of institutions holding this record. | |
| getInstructor | //none// | string | Get the instructor. | | | getInstructor | //none// | string | Get the instructor. | |
| getInstructorId | //none// | string | Get the instructor ID. | | | getInstructorId | //none// | string | Get the instructor ID. | |
| | getISBNs | //none// | array | Get an array of all ISBNs associated with the record (may be empty). | |
| | getISSNs | //none// | array | Get an array of all ISSNs associated with the record (may be empty). | |
| getItemCount | //none// | int | Get a count of items associated with this record. | | | getItemCount | //none// | int | Get a count of items associated with this record. | |
| getLCCN | //none// | string | Get a LCCN, normalised according to info:lccn | | | getLCCN | //none// | string | Get a LCCN, normalised according to info:lccn | |
| getMarcRecord | //none// | File_MARCBASE | Get access to the raw File_MARC object. | | | getMarcRecord | //none// | File_MARCBASE | Get access to the raw File_MARC object. | |
| getNewerTitles | //none// | array | Get an array of newer titles for the record. | | | getNewerTitles | //none// | array | Get an array of newer titles for the record. | |
| getOCLC | //none// | array | Get the OCLC number of the record. | | | getOCLC | //none// | array | Get the OCLC number(s) of the record. | |
| getOpenURL | //none// | string OpenURL parameters. | Get the OpenURL parameters to represent this record (useful for the title attribute of a COinS span tag). | | | getOpenURL / getOpenUrl | //none// | string OpenURL parameters. | Get the OpenURL parameters to represent this record (useful for the title attribute of a COinS span tag). \\ :!: Renamed from getOpenURL to getOpenUrl in VuFind 2.5. | |
| getPhysicalDescriptions | //none// | array | Get an array of physical descriptions of the item. | | | getPhysicalDescriptions | //none// | array | Get an array of physical descriptions of the item. | |
| getPlacesOfPublication | //none// | array | Get the item's place of publication. | | | getPlacesOfPublication | //none// | array | Get the item's place of publication. | |
| getShortTitle | //none// | string | Get the short (pre-subtitle) title of the record. | | | getShortTitle | //none// | string | Get the short (pre-subtitle) title of the record. | |
| getSnippetCaption | $field (string) | mixed Caption if found, false if none available. | Given a Solr field name, return an appropriate caption. \\ \\ $field - Solr field name | | | getSnippetCaption | $field (string) | mixed Caption if found, false if none available. | Given a Solr field name, return an appropriate caption. \\ \\ $field - Solr field name | |
| | getSource | //none// | string | Get the source (e.g. a particular database) of hte record. | |
| getSubfieldArray | $currentField (object) | array | Return an array of non-empty subfield values found in the provided MARC field. If $concat is true, the array will contain either zero or one entries (empty array if no subfields found, subfield values concatenated together in specified order if found). If concat is false, the array will contain a separate entry for each subfield value found. \\ \\ $currentField - Result from File_MARC::getFields. \\ \\ $subfields - The MARC subfield codes to read \\ \\ $concat - Should we concatenate subfields? | | | getSubfieldArray | $currentField (object) | array | Return an array of non-empty subfield values found in the provided MARC field. If $concat is true, the array will contain either zero or one entries (empty array if no subfields found, subfield values concatenated together in specified order if found). If concat is false, the array will contain a separate entry for each subfield value found. \\ \\ $currentField - Result from File_MARC::getFields. \\ \\ $subfields - The MARC subfield codes to read \\ \\ $concat - Should we concatenate subfields? | |
| ::: | $subfields (array) | ::: | ::: | | | ::: | $subfields (array) | ::: | ::: | |
| getTOC | //none// | array | Get an array of lines from the table of contents. | | | getTOC | //none// | array | Get an array of lines from the table of contents. | |
| getTargetAudienceNotes | //none// | array | Get an array of note about the record's target audience. | | | getTargetAudienceNotes | //none// | array | Get an array of note about the record's target audience. | |
| getThumbnail | $size (array) | string/array/bool | Returns one of three things: a full URL to a thumbnail preview of the record if an image is available in an external system; an array of parameters to send to VuFind's internal cover generator if no fixed URL exists; or false if no thumbnail can be generated. \\ \\ $size - Size of thumbnail (small, medium or large -- small is default). | | | getThumbnail | $size (array) | string/array/bool | Returns one of three things: a full URL to a thumbnail preview of the record if an image is available in an external system; an array of parameters to send to VuFind's internal cover generator if no fixed URL exists; or false if no thumbnail can be generated. \\ You can enable icons by including the parameter 'contenttype' (e.g. the record's format) in the returned array of parameters. VuFind will try to retrieve a cover based on the parameters but will fallback to icons if no cover can be found - if only parameters 'size' and 'contenttype' are returned display of icons is enforced (make sure that the icons are exactly named after the contenttypes, including case sensitivity, and reside in the theme's images/{$size}/ folder). For an example implementation refer to the Summon.php RecordDriver. \\ \\ $size - Size of thumbnail (small, medium or large -- small is default). | |
| getTitle | //none// | string | Get the full title of the record. | | | getTitle | //none// | string | Get the full title of the record. | |
| getTitleSection | //none// | string | Get the text of the partsection portion of the title. | | | getTitleSection | //none// | string | Get the text of the partsection portion of the title. | |
| getTitleStatement | //none// | string | Get the statement of responsibility that goes with the title (i.e. "by John Smith"). | | | getTitleStatement | //none// | string | Get the statement of responsibility that goes with the title (i.e. "by John Smith"). | |
| | getUPC | //none// | array | Get the UPC(s) of the record. | |
| getURLs | //none// | array | Return an array of associative arrays representing URLs associated with this record. Each of these associative arrays MAY contain a 'desc' key with a description (URL will be displayed if description is absent) and MUST contain EITHER a 'url' key with a full URL OR 'route' / 'routeParams' / 'queryString' keys with details on how to build a URL using VuFind's routing system. | | | getURLs | //none// | array | Return an array of associative arrays representing URLs associated with this record. Each of these associative arrays MAY contain a 'desc' key with a description (URL will be displayed if description is absent) and MUST contain EITHER a 'url' key with a full URL OR 'route' / 'routeParams' / 'queryString' keys with details on how to build a URL using VuFind's routing system. | |
| getUseFor | //none// | array | Get the use for references for the record. | | | getUseFor | //none// | array | Get the use for references for the record. | |