当前位置: 首页>>代码示例>>PHP>>正文


PHP Library::fetch方法代码示例

本文整理汇总了PHP中Library::fetch方法的典型用法代码示例。如果您正苦于以下问题:PHP Library::fetch方法的具体用法?PHP Library::fetch怎么用?PHP Library::fetch使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Library的用法示例。


在下文中一共展示了Library::fetch方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getObjectStructure

 static function getObjectStructure()
 {
     global $user;
     //Load Libraries for lookup values
     $library = new Library();
     $library->orderBy('displayName');
     if ($user->hasRole('libraryAdmin')) {
         $homeLibrary = Library::getPatronHomeLibrary();
         $library->libraryId = $homeLibrary->libraryId;
     }
     $library->find();
     $libraryList = array();
     while ($library->fetch()) {
         $libraryList[$library->libraryId] = $library->displayName;
     }
     require_once ROOT_DIR . '/sys/Browse/BrowseCategory.php';
     $browseCategories = new BrowseCategory();
     $browseCategories->orderBy('label');
     $browseCategories->find();
     $browseCategoryList = array();
     while ($browseCategories->fetch()) {
         $browseCategoryList[$browseCategories->textId] = $browseCategories->label . " ({$browseCategories->textId})";
     }
     $structure = array('id' => array('property' => 'id', 'type' => 'label', 'label' => 'Id', 'description' => 'The unique id of the hours within the database'), 'libraryId' => array('property' => 'libraryId', 'type' => 'enum', 'values' => $libraryList, 'label' => 'Library', 'description' => 'A link to the library which the location belongs to'), 'browseCategoryTextId' => array('property' => 'browseCategoryTextId', 'type' => 'enum', 'values' => $browseCategoryList, 'label' => 'Browse Category', 'description' => 'The browse category to display '), 'weight' => array('property' => 'weight', 'type' => 'numeric', 'label' => 'Weight', 'weight' => 'Defines how lists are sorted within the widget.  Lower weights are displayed to the left of the screen.', 'required' => true));
     foreach ($structure as $fieldName => $field) {
         $field['propertyOld'] = $field['property'] . 'Old';
         $structure[$fieldName] = $field;
     }
     return $structure;
 }
开发者ID:victorfcm,项目名称:VuFind-Plus,代码行数:30,代码来源:LibraryBrowseCategory.php

示例2: getObjectStructure

 static function getObjectStructure()
 {
     $library = new Library();
     $library->orderBy('displayName');
     $library->find();
     $libraryList = array();
     while ($library->fetch()) {
         $libraryList[$library->libraryId] = $library->displayName;
     }
     $structure = array('id' => array('property' => 'id', 'type' => 'label', 'label' => 'Id', 'description' => 'The unique id of the holiday within the database'), 'libraryId' => array('property' => 'libraryId', 'type' => 'enum', 'values' => $libraryList, 'label' => 'Library', 'description' => 'A link to the library'), 'date' => array('property' => 'date', 'type' => 'date', 'label' => 'Date', 'description' => 'The date of a holiday.', 'required' => true), 'name' => array('property' => 'name', 'type' => 'text', 'label' => 'Holiday Name', 'description' => 'The name of a holiday'));
     foreach ($structure as $fieldName => $field) {
         $field['propertyOld'] = $field['property'] . 'Old';
         $structure[$fieldName] = $field;
     }
     return $structure;
 }
开发者ID:bryandease,项目名称:VuFind-Plus,代码行数:16,代码来源:Holiday.php

示例3: getAllObjects

 function getAllObjects()
 {
     $libraryList = array();
     global $user;
     if ($user->hasRole('opacAdmin')) {
         $library = new Library();
         $library->orderBy('subdomain');
         $library->find();
         while ($library->fetch()) {
             $libraryList[$library->libraryId] = clone $library;
         }
     } else {
         if ($user->hasRole('libraryAdmin')) {
             $patronLibrary = Library::getLibraryForLocation($user->homeLocationId);
             $libraryList[$patronLibrary->libraryId] = clone $patronLibrary;
         }
     }
     return $libraryList;
 }
开发者ID:victorfcm,项目名称:VuFind-Plus,代码行数:19,代码来源:Libraries.php

示例4: getObjectStructure

 static function getObjectStructure()
 {
     global $configArray;
     //Load Libraries for lookup values
     $library = new Library();
     $library->orderBy('displayName');
     $library->find();
     $libraryList = array();
     $libraryList[-1] = "All Libraries";
     while ($library->fetch()) {
         $libraryList[$library->libraryId] = $library->displayName;
     }
     $structure = array('id' => array('property' => 'id', 'type' => 'hidden', 'label' => 'Id', 'primaryKey' => true, 'description' => 'The unique id of the e-pub file.'), 'item_type' => array('property' => 'item_type', 'type' => 'enum', 'label' => 'Type', 'values' => EContentItem::getValidItemTypes(), 'description' => 'The type of file being added', 'required' => true, 'storeDb' => true, 'storeSolr' => false), 'libraryId' => array('property' => 'libraryId', 'type' => 'enum', 'label' => 'For use by', 'values' => $libraryList, 'description' => 'The library system that has access to the link', 'required' => true, 'storeDb' => true, 'storeSolr' => false), 'link' => array('property' => 'link', 'type' => 'text', 'label' => 'External Link', 'size' => 100, 'maxLength' => 255, 'description' => 'A link to an external website or document.', 'required' => false, 'storeDb' => true, 'storeSolr' => false), 'filename' => array('property' => 'filename', 'type' => 'file', 'label' => 'Source File', 'path' => $configArray['EContent']['library'], 'description' => 'The source file for display or download within VuFind.', 'serverValidation' => 'validateEpub', 'required' => false, 'storeDb' => true, 'storeSolr' => false), 'folder' => array('property' => 'folder', 'type' => 'folder', 'size' => 100, 'maxLength' => 100, 'label' => 'Folder of MP3 Files (must exist already)', 'path' => $configArray['EContent']['library'], 'description' => 'The directory containing the MP3 files.  Must already exist on the econtent server.', 'serverValidation' => 'validateEpub', 'required' => false, 'storeDb' => true, 'storeSolr' => false), 'acsId' => array('property' => 'acsId', 'type' => 'hidden', 'label' => 'ACS ID', 'description' => 'The ID of the title within the Adobe Content Server.', 'storeDb' => true, 'storeSolr' => false), 'recordId' => array('property' => 'recordId', 'type' => 'hidden', 'label' => 'Record ID', 'description' => 'The ID of the record this item is attached to.', 'storeDb' => true, 'storeSolr' => false), 'notes' => array('property' => 'notes', 'type' => 'text', 'label' => 'Notes', 'description' => 'Notes to the patron to be displayed in the catalog.', 'storeDb' => true, 'storeSolr' => false), 'reviewStatus' => array('property' => 'reviewStatus', 'type' => 'enum', 'values' => array('Not Reviewed' => 'Not Reviewed', 'Approved' => 'Approved', 'Rejected' => 'Rejected'), 'label' => 'Review Status', 'description' => 'The status of the review of the item.', 'storeDb' => true, 'storeSolr' => false, 'default' => 'Not Reviewed'), 'reviewNotes' => array('property' => 'reviewNotes', 'type' => 'textarea', 'label' => 'Review Notes', 'description' => 'Notes relating to the reivew.', 'storeDb' => true, 'storeSolr' => false), 'size' => array('property' => 'size', 'type' => 'label', 'label' => 'Size', 'description' => 'The size of the item in bytes or 0 if not known.', 'storeDb' => false, 'storeSolr' => false), 'externalFormat' => array('property' => 'externalFormat', 'type' => 'label', 'label' => 'External Format', 'description' => 'The textual format for external items for use with OverDrive.', 'storeDb' => false, 'storeSolr' => false), 'externalFormatId' => array('property' => 'externalFormatId', 'type' => 'hidden', 'label' => 'External Format Id', 'description' => 'The internal format for external items for use with OverDrive.', 'storeDb' => false, 'storeSolr' => false), 'externalFormatNumeric' => array('property' => 'externalFormatNumeric', 'type' => 'hidden', 'label' => 'External Format Id', 'description' => 'The numeric format for external items for use with OverDrive.', 'storeDb' => false, 'storeSolr' => false), 'identifier' => array('property' => 'identifier', 'type' => 'label', 'label' => 'Identifier (ISBN/ASIN)', 'description' => 'The Identifier (ISBN/ASIN) for the item if we can split from record.', 'storeDb' => false, 'storeSolr' => false), 'sample' => array('property' => 'sample', 'type' => 'label', 'label' => 'Sample', 'description' => 'A url to get a sample of the title.', 'storeDb' => false, 'storeSolr' => false));
     foreach ($structure as $fieldName => $field) {
         $field['propertyOld'] = $field['property'] . 'Old';
         $structure[$fieldName] = $field;
     }
     return $structure;
 }
开发者ID:victorfcm,项目名称:VuFind-Plus,代码行数:19,代码来源:EContentItem.php

示例5: getObjectStructure

 static function getObjectStructure()
 {
     global $user;
     $library = new Library();
     $library->orderBy('displayName');
     if ($user->hasRole('libraryAdmin')) {
         $homeLibrary = Library::getPatronHomeLibrary();
         $library->libraryId = $homeLibrary->libraryId;
     }
     $library->find();
     while ($library->fetch()) {
         $libraryList[$library->libraryId] = $library->displayName;
     }
     $structure = parent::getObjectStructure();
     $structure['libraryId'] = array('property' => 'libraryId', 'type' => 'enum', 'values' => $libraryList, 'label' => 'Library', 'description' => 'The id of a library');
     foreach ($structure as $fieldName => $field) {
         $field['propertyOld'] = $field['property'] . 'Old';
         $structure[$fieldName] = $field;
     }
     return $structure;
 }
开发者ID:bryandease,项目名称:VuFind-Plus,代码行数:21,代码来源:LibraryFacetSetting.php

示例6: getObjectStructure

 static function getObjectStructure()
 {
     global $user;
     //Load Libraries for lookup values
     $library = new Library();
     $library->orderBy('displayName');
     if ($user->hasRole('libraryAdmin')) {
         $homeLibrary = Library::getPatronHomeLibrary();
         $library->libraryId = $homeLibrary->libraryId;
     }
     $library->find();
     $libraryList = array();
     while ($library->fetch()) {
         $libraryList[$library->libraryId] = $library->displayName;
     }
     $structure = array('id' => array('property' => 'id', 'type' => 'label', 'label' => 'Id', 'description' => 'The unique id of the hours within the database'), 'libraryId' => array('property' => 'libraryId', 'type' => 'enum', 'values' => $libraryList, 'label' => 'Library', 'description' => 'A link to the library which the location belongs to'), 'category' => array('property' => 'category', 'type' => 'text', 'label' => 'Category', 'description' => 'The category of the link', 'size' => '80', 'maxLength' => 100), 'linkText' => array('property' => 'linkText', 'type' => 'text', 'label' => 'Link Text', 'description' => 'The text to display for the link ', 'size' => '80', 'maxLength' => 100), 'url' => array('property' => 'url', 'type' => 'text', 'label' => 'URL', 'description' => 'The url to link to', 'size' => '80', 'maxLength' => 255), 'weight' => array('property' => 'weight', 'type' => 'numeric', 'label' => 'Weight', 'weight' => 'Defines how lists are sorted within the widget.  Lower weights are displayed to the left of the screen.', 'required' => true));
     foreach ($structure as $fieldName => $field) {
         $field['propertyOld'] = $field['property'] . 'Old';
         $structure[$fieldName] = $field;
     }
     return $structure;
 }
开发者ID:victorfcm,项目名称:VuFind-Plus,代码行数:22,代码来源:LibraryLinks.php

示例7: getObjectStructure

 function getObjectStructure()
 {
     global $user;
     $library = new Library();
     $library->orderBy('displayName');
     if ($user->hasRole('library_material_requests')) {
         $homeLibrary = Library::getPatronHomeLibrary();
         $library->libraryId = $homeLibrary->libraryId;
     } else {
         $libraryList[-1] = 'Default';
     }
     $library->find();
     while ($library->fetch()) {
         $libraryList[$library->libraryId] = $library->displayName;
     }
     $structure = array('id' => array('property' => 'id', 'type' => 'label', 'label' => 'Id', 'description' => 'The unique id of the libary within the database'), 'description' => array('property' => 'description', 'type' => 'text', 'size' => 80, 'label' => 'Description', 'description' => 'A unique name for the Status'), 'isDefault' => array('property' => 'isDefault', 'type' => 'checkbox', 'label' => 'Default Status?', 'description' => 'Whether or not this status is the default status to apply to new requests'), 'isPatronCancel' => array('property' => 'isPatronCancel', 'type' => 'checkbox', 'label' => 'Set When Patron Cancels?', 'description' => 'Whether or not this status should be set when the patron cancels their request'), 'isOpen' => array('property' => 'isOpen', 'type' => 'checkbox', 'label' => 'Open Status?', 'description' => 'Whether or not this status needs further processing'), 'sendEmailToPatron' => array('property' => 'sendEmailToPatron', 'type' => 'checkbox', 'label' => 'Send Email To Patron?', 'description' => 'Whether or not an email should be sent to the patron when this status is set'), 'emailTemplate' => array('property' => 'emailTemplate', 'type' => 'textarea', 'rows' => 6, 'cols' => 60, 'label' => 'Email Template', 'description' => 'The template to use when sending emails to the user', 'hideInLists' => true), 'libraryId' => array('property' => 'libraryId', 'type' => 'enum', 'values' => $libraryList, 'label' => 'Library', 'description' => 'The id of a library'));
     foreach ($structure as $fieldName => $field) {
         $field['propertyOld'] = $field['property'] . 'Old';
         $structure[$fieldName] = $field;
     }
     return $structure;
 }
开发者ID:bryandease,项目名称:VuFind-Plus,代码行数:22,代码来源:MaterialsRequestStatus.php

示例8: getObjectStructure

 static function getObjectStructure()
 {
     $library = new Library();
     $library->orderBy('displayName');
     $library->find();
     $libraryList = array('-1' => 'Default');
     while ($library->fetch()) {
         $libraryList[$library->libraryId] = $library->displayName;
     }
     $store = new BookStore();
     $store->orderBy('storeName');
     $store->find();
     $storeList = array();
     while ($store->fetch()) {
         $storeList[$store->id] = $store->storeName;
     }
     $structure = array('id' => array('property' => 'id', 'type' => 'label', 'label' => 'Id', 'description' => 'The unique id of this association'), 'libraryId' => array('property' => 'libraryId', 'type' => 'enum', 'values' => $libraryList, 'label' => 'Library', 'description' => 'The id of a library'), 'storeId' => array('property' => 'storeId', 'type' => 'enum', 'values' => $storeList, 'label' => 'Book Store', 'description' => 'The id of a book store'), 'weight' => array('property' => 'weight', 'type' => 'text', 'label' => 'Weight', 'description' => 'The sort order of the book store'));
     foreach ($structure as $fieldName => $field) {
         $field['propertyOld'] = $field['property'] . 'Old';
         $structure[$fieldName] = $field;
     }
     return $structure;
 }
开发者ID:bryandease,项目名称:VuFind-Plus,代码行数:23,代码来源:NearbyBookStore.php

示例9: getObjectStructure

 static function getObjectStructure()
 {
     global $user;
     //Load Libraries for lookup values
     $library = new Library();
     $library->orderBy('displayName');
     if ($user->hasRole('libraryAdmin')) {
         $homeLibrary = Library::getPatronHomeLibrary();
         $library->libraryId = $homeLibrary->libraryId;
     }
     $library->find();
     $libraryList = array();
     while ($library->fetch()) {
         $libraryList[$library->libraryId] = $library->displayName;
     }
     require_once ROOT_DIR . '/RecordDrivers/Interface.php';
     $validSources = RecordInterface::getValidMoreDetailsSources();
     $structure = array('id' => array('property' => 'id', 'type' => 'label', 'label' => 'Id', 'description' => 'The unique id of the hours within the database'), 'libraryId' => array('property' => 'libraryId', 'type' => 'enum', 'values' => $libraryList, 'label' => 'Library', 'description' => 'A link to the library which the location belongs to'), 'source' => array('property' => 'source', 'type' => 'enum', 'label' => 'Source', 'values' => $validSources, 'description' => 'The source of the data to display'), 'collapseByDefault' => array('property' => 'collapseByDefault', 'type' => 'checkbox', 'label' => 'Collapse By Default', 'description' => 'Whether or not the section should be collapsed by default', 'default' => true), 'weight' => array('property' => 'weight', 'type' => 'numeric', 'label' => 'Weight', 'weight' => 'Defines how lists are sorted within the widget.  Lower weights are displayed to the left of the screen.', 'required' => true));
     foreach ($structure as $fieldName => $field) {
         $field['propertyOld'] = $field['property'] . 'Old';
         $structure[$fieldName] = $field;
     }
     return $structure;
 }
开发者ID:victorfcm,项目名称:VuFind-Plus,代码行数:24,代码来源:LibraryMoreDetails.php

示例10: getObjectStructure

 function getObjectStructure()
 {
     global $user;
     //Load Libraries for lookup values
     $libraryList = array();
     if ($user->hasRole('opacAdmin')) {
         $library = new Library();
         $library->orderBy('displayName');
         $library->find();
         $libraryList[-1] = 'All Libraries';
         while ($library->fetch()) {
             $libraryList[$library->libraryId] = $library->displayName;
         }
     } elseif ($user->hasRole('libraryAdmin') || $user->hasRole('contentEditor')) {
         $homeLibrary = Library::getPatronHomeLibrary();
         $libraryList[$homeLibrary->libraryId] = $homeLibrary->displayName;
     }
     $structure = array('id' => array('property' => 'id', 'type' => 'hidden', 'label' => 'Id', 'description' => 'The unique id of the list widget file.', 'primaryKey' => true, 'storeDb' => true), 'libraryId' => array('property' => 'libraryId', 'type' => 'enum', 'values' => $libraryList, 'label' => 'Library', 'description' => 'A link to the library which the location belongs to'), 'name' => array('property' => 'name', 'type' => 'text', 'label' => 'Name', 'description' => 'The name of the widget.', 'maxLength' => 255, 'size' => 100, 'serverValidation' => 'validateName', 'storeDb' => true), 'description' => array('property' => 'description', 'type' => 'textarea', 'rows' => 3, 'cols' => 80, 'label' => 'Description', 'description' => 'A description for the widget', 'storeDb' => true, 'hideInLists' => true), 'showTitle' => array('property' => 'showTitle', 'type' => 'checkbox', 'label' => 'Should the title for the currently selected title be shown?', 'storeDb' => true, 'default' => true, 'hideInLists' => true), 'showAuthor' => array('property' => 'showAuthor', 'type' => 'checkbox', 'label' => 'Should the author for the currently selected title be shown?', 'storeDb' => true, 'default' => true, 'hideInLists' => true), 'showRatings' => array('property' => 'showRatings', 'type' => 'checkbox', 'label' => 'Should ratings widgets be shown under each cover?', 'storeDb' => true, 'default' => false, 'hideInLists' => true), 'style' => array('property' => 'style', 'type' => 'enum', 'label' => 'The style to use when displaying the list widget', 'values' => $this->styles, 'storeDb' => true, 'default' => 'horizontal', 'hideInLists' => true), 'autoRotate' => array('property' => 'autoRotate', 'type' => 'checkbox', 'label' => 'Should the widget automatically rotate between titles?', 'storeDb' => true, 'hideInLists' => true), 'coverSize' => array('property' => 'coverSize', 'type' => 'enum', 'label' => 'The cover size to use when showing a widget', 'values' => array('small' => 'Small', 'medium' => 'Medium'), 'storeDb' => true, 'default' => 'small', 'hideInLists' => true), 'customCss' => array('property' => 'customCss', 'type' => 'url', 'label' => 'Custom CSS File', 'maxLength' => 255, 'size' => 100, 'description' => 'The URL to an external css file to be included when rendering as an iFrame.', 'storeDb' => true, 'required' => false, 'hideInLists' => true), 'listDisplayType' => array('property' => 'listDisplayType', 'type' => 'enum', 'values' => $this->displayTypes, 'label' => 'Display lists as', 'description' => 'The method used to show the user the multiple lists associated with the widget.', 'storeDb' => true, 'hideInLists' => true), 'showListWidgetTitle' => array('property' => 'showListWidgetTitle', 'type' => 'checkbox', 'label' => 'Show the list widget\'s title bar', 'description' => 'Whether or not the widget\'s title bar is shown. (Enabling the Show More Link will force the title bar to be shown as well.)', 'storeDb' => true, 'hideInLists' => true, 'default' => true), 'showViewMoreLink' => array('property' => 'showViewMoreLink', 'type' => 'checkbox', 'label' => 'Show the View More link on the title bar of the widget.', 'storeDb' => true, 'hideInLists' => true, 'default' => false), 'viewMoreLinkMode' => array('property' => 'viewMoreLinkMode', 'type' => 'enum', 'values' => array('list' => 'List', 'covers' => 'Covers'), 'label' => 'Display mode for search results link', 'description' => 'The mode to show full search results in when the View More link is clicked.', 'storeDb' => true, 'hideInLists' => true), 'lists' => array('property' => 'lists', 'type' => 'oneToMany', 'keyThis' => 'id', 'keyOther' => 'listWidgetId', 'subObjectType' => 'ListWidgetList', 'structure' => ListWidgetList::getObjectStructure(), 'label' => 'Lists', 'description' => 'The lists to be displayed within the widget.', 'sortable' => true, 'storeDb' => true, 'serverValidation' => 'validateLists', 'editLink' => 'ListWidgetsListsLinks', 'hideInLists' => true));
     foreach ($structure as $fieldName => $field) {
         $field['propertyOld'] = $field['property'] . 'Old';
         $structure[$fieldName] = $field;
     }
     return $structure;
 }
开发者ID:victorfcm,项目名称:VuFind-Plus,代码行数:24,代码来源:ListWidget.php

示例11: getObjectStructure

 function getObjectStructure()
 {
     global $user;
     //Load Libraries for lookup values
     $libraryList = array();
     if ($user->hasRole('opacAdmin')) {
         $library = new Library();
         $library->orderBy('displayName');
         $library->find();
         $libraryList[-1] = 'All Libraries';
         while ($library->fetch()) {
             $libraryList[$library->libraryId] = $library->displayName;
         }
     } elseif ($user->hasRole('libraryAdmin') || $user->hasRole('contentEditor')) {
         $homeLibrary = Library::getPatronHomeLibrary();
         $libraryList[$homeLibrary->libraryId] = $homeLibrary->displayName;
     }
     $structure = array('id' => array('property' => 'id', 'type' => 'hidden', 'label' => 'Id', 'description' => 'The unique id of the list widget file.', 'primaryKey' => true, 'storeDb' => true), 'libraryId' => array('property' => 'libraryId', 'type' => 'enum', 'values' => $libraryList, 'label' => 'Library', 'description' => 'A link to the library which the location belongs to'), 'name' => array('property' => 'name', 'type' => 'text', 'label' => 'Name', 'description' => 'The name of the widget.', 'maxLength' => 255, 'size' => 100, 'serverValidation' => 'validateName', 'storeDb' => true), 'description' => array('property' => 'description', 'type' => 'textarea', 'rows' => 3, 'cols' => 80, 'label' => 'Description', 'description' => 'A description for the widget', 'storeDb' => true, 'hideInLists' => true), 'showTitleDescriptions' => array('property' => 'showTitleDescriptions', 'type' => 'checkbox', 'label' => 'Should the description pop-up be shown when hovering over titles?', 'storeDb' => true, 'default' => true, 'hideInLists' => true), 'showMultipleTitles' => array('property' => 'showMultipleTitles', 'type' => 'checkbox', 'label' => 'Should multiple titles by shown in in the widget or should only one title be shown at a time?', 'storeDb' => true, 'default' => true, 'hideInLists' => true), 'style' => array('property' => 'style', 'type' => 'enum', 'label' => 'The style to use when displaying the list widget', 'values' => array('horizontal' => 'Horizontal', 'vertical' => 'Vertical', 'single' => 'Single Title'), 'storeDb' => true, 'default' => 'horizontal', 'hideInLists' => true), 'autoRotate' => array('property' => 'autoRotate', 'type' => 'checkbox', 'label' => 'Should the widget automatically rotate between titles?', 'storeDb' => true, 'hideInLists' => true), 'onSelectCallback' => array('property' => 'onSelectCallback', 'type' => 'text', 'label' => 'On Select Callback', 'description' => 'A javascript callback to invoke when a title is selected to override the default behavior.', 'storeDb' => true, 'hideInLists' => true), 'customCss' => array('property' => 'customCss', 'type' => 'url', 'label' => 'Custom CSS File', 'maxLength' => 255, 'size' => 100, 'description' => 'The URL to an external css file to be included when rendering as an iFrame.', 'storeDb' => true, 'required' => false, 'hideInLists' => true), 'listDisplayType' => array('property' => 'listDisplayType', 'type' => 'enum', 'values' => array('tabs' => 'Tabbed Display', 'dropdown' => 'Drop Down List'), 'label' => 'Display lists as', 'description' => 'The URL to an external css file to be included wen rendering as an iFrame.', 'storeDb' => true, 'hideInLists' => true), 'lists' => array('property' => 'lists', 'type' => 'oneToMany', 'keyThis' => 'id', 'keyOther' => 'listWidgetId', 'subObjectType' => 'ListWidgetList', 'structure' => ListWidgetList::getObjectStructure(), 'label' => 'Lists', 'description' => 'The lists to be displayed within the widget.', 'sortable' => true, 'storeDb' => true, 'serverValidation' => 'validateLists', 'editLink' => 'ListWidgetsListsLinks', 'hideInLists' => true));
     foreach ($structure as $fieldName => $field) {
         $field['propertyOld'] = $field['property'] . 'Old';
         $structure[$fieldName] = $field;
     }
     return $structure;
 }
开发者ID:bryandease,项目名称:VuFind-Plus,代码行数:24,代码来源:ListWidget.php

示例12: MIN

set_time_limit(300);
mysql_query('set @r=0; UPDATE title_browse SET alphaRank = @r:=(@r + 1) ORDER BY `sortValue`;');
$logger->log('Updated Alpha Rank for Title browse index', PEAR_LOG_INFO);
mysql_query('TRUNCATE title_browse_metadata;');
mysql_query('INSERT INTO title_browse_metadata (SELECT 0, -1, MIN(alphaRank) as minAlphaRank, MAX(alphaRank) as maxAlphaRank, count(id) as numResults FROM title_browse inner join title_browse_scoped_results_global ON id = browseValueId where alphaRank > 0)');
echo "<br>Built Title browse index\r\n";
$logger->log('Built Title browse index', PEAR_LOG_INFO);
ob_flush();
set_time_limit(300);
mysql_query('set @r=0; UPDATE subject_browse SET alphaRank = @r:=(@r + 1) ORDER BY `sortValue`;');
$logger->log('Updated Alpha Rank for Subject browse index', PEAR_LOG_INFO);
mysql_query('TRUNCATE subject_browse_metadata;');
mysql_query('INSERT INTO subject_browse_metadata (SELECT 0, -1, MIN(alphaRank) as minAlphaRank, MAX(alphaRank) as maxAlphaRank, count(id) as numResults FROM subject_browse inner join subject_browse_scoped_results_global ON id = browseValueId where alphaRank > 0)');
echo "<br>Built Subject browse index\r\n";
$logger->log('Built Subject browse index', PEAR_LOG_INFO);
ob_flush();
set_time_limit(300);
mysql_query('set @r=0; UPDATE callnumber_browse SET alphaRank = @r:=(@r + 1) ORDER BY `sortValue`;');
$logger->log('Updated Alpha Rank for Call number browse index', PEAR_LOG_INFO);
mysql_query('TRUNCATE callnumber_browse_metadata;');
mysql_query('INSERT INTO callnumber_browse_metadata (SELECT 0, -1, MIN(alphaRank) as minAlphaRank, MAX(alphaRank) as maxAlphaRank, count(id) as numResults FROM callnumber_browse inner join callnumber_browse_scoped_results_global ON id = browseValueId where alphaRank > 0)');
echo "<br>Built Call Number browse index\r\n";
$logger->log('Built Call Number browse index', PEAR_LOG_INFO);
ob_flush();
while ($library->fetch()) {
    mysql_query("INSERT INTO title_browse_metadata (SELECT 1, {$library->libraryId}, MIN(alphaRank) as minAlphaRank, MAX(alphaRank) as maxAlphaRank, count(id) as numResults FROM title_browse inner join title_browse_scoped_results_library_{$library->subdomain} ON id = browseValueId where alphaRank > 0)");
    mysql_query("INSERT INTO author_browse_metadata (SELECT 1, {$library->libraryId}, MIN(alphaRank) as minAlphaRank, MAX(alphaRank) as maxAlphaRank, count(id) as numResults FROM author_browse inner join author_browse_scoped_results_library_{$library->subdomain} ON id = browseValueId where alphaRank > 0)");
    mysql_query("INSERT INTO subject_browse_metadata (SELECT 1, {$library->libraryId}, MIN(alphaRank) as minAlphaRank, MAX(alphaRank) as maxAlphaRank, count(id) as numResults FROM subject_browse inner join subject_browse_scoped_results_library_{$library->subdomain} ON id = browseValueId where alphaRank > 0)");
    mysql_query("INSERT INTO callnumber_browse_metadata (SELECT 1, {$library->libraryId}, MIN(alphaRank) as minAlphaRank, MAX(alphaRank) as maxAlphaRank, count(id) as numResults FROM callnumber_browse inner join callnumber_browse_scoped_results_library_{$library->subdomain} ON id = browseValueId where alphaRank > 0)");
    echo "<br>Built meta data for {$library->displayName}\r\n";
}
开发者ID:bryandease,项目名称:VuFind-Plus,代码行数:31,代码来源:buildAlphaBrowseIndexes.php

示例13: launch

 function launch()
 {
     global $interface;
     global $user;
     global $logger;
     $libraries = array();
     $library = new Library();
     $library->orderBy('displayName');
     $library->find();
     while ($library->fetch()) {
         $libraries[$library->libraryId] = array('id' => $library->libraryId, 'displayName' => $library->displayName, 'subdomain' => $library->subdomain);
     }
     $interface->assign('libraries', $libraries);
     global $locationSingleton;
     $physicalLocation = $locationSingleton->getActiveLocation();
     if (isset($_REQUEST['gotoModule'])) {
         $gotoModule = $_REQUEST['gotoModule'];
         $interface->assign('gotoModule', $gotoModule);
     }
     if (isset($_REQUEST['gotoAction'])) {
         $gotoAction = $_REQUEST['gotoAction'];
         $interface->assign('gotoAction', $gotoAction);
     }
     $redirectLibrary = null;
     if (isset($_REQUEST['library'])) {
         $redirectLibrary = $_REQUEST['library'];
     } elseif (!is_null($physicalLocation)) {
         $redirectLibrary = $physicalLocation->libraryId;
     } elseif ($user && isset($user->preferredLibraryInterface) && is_numeric($user->preferredLibraryInterface)) {
         $redirectLibrary = $user->preferredLibraryInterface;
     } elseif (isset($_COOKIE['PreferredLibrarySystem'])) {
         $redirectLibrary = $_COOKIE['PreferredLibrarySystem'];
     }
     if ($redirectLibrary != null) {
         $logger->log("Selected library {$redirectLibrary}", PEAR_LOG_DEBUG);
         $selectedLibrary = $libraries[$redirectLibrary];
         global $configArray;
         $baseUrl = $configArray['Site']['url'];
         $urlPortions = explode('://', $baseUrl);
         //Get rid of extra portions of the url
         $subdomain = $selectedLibrary['subdomain'];
         if (strpos($urlPortions[1], 'opac2') !== false) {
             $urlPortions[1] = str_replace('opac2.', '', $urlPortions[1]);
             $subdomain .= '2';
         }
         $urlPortions[1] = str_replace('opac.', '', $urlPortions[1]);
         $baseUrl = $urlPortions[0] . '://' . $subdomain . '.' . $urlPortions[1];
         if ($gotoModule) {
             $baseUrl .= '/' . $gotoModule;
         }
         if ($gotoAction) {
             $baseUrl .= '/' . $gotoAction;
         }
         if (isset($_REQUEST['rememberThis']) && isset($_REQUEST['submit'])) {
             if ($user) {
                 $user->preferredLibraryInterface = $redirectLibrary;
                 $user->update();
                 $_SESSION['userinfo'] = serialize($user);
             }
             //Set a cookie to remember the location when not logged in
             //Remember for a year
             setcookie('PreferredLibrarySystem', $redirectLibrary, time() + 60 * 60 * 24 * 365, '/');
         }
         header('Location:' . $baseUrl);
         die;
     }
     //Build the actual view
     $interface->setTemplate('selectInterface.tpl');
     $interface->setPageTitle('Select Library Catalog');
     // Display Page
     $interface->display('layout.tpl');
 }
开发者ID:victorfcm,项目名称:VuFind-Plus,代码行数:72,代码来源:SelectInterface.php

示例14: getObjectStructure

 function getObjectStructure()
 {
     $structure = array('id' => array('property' => 'id', 'type' => 'hidden', 'label' => 'Id', 'primaryKey' => true, 'description' => 'The unique id of the e-pub file.', 'storeDb' => true, 'storeSolr' => false), 'recordtype' => array('property' => 'recordtype', 'type' => 'method', 'methodName' => 'recordtype', 'storeDb' => false, 'storeSolr' => true), 'solrId' => array('property' => 'id', 'type' => 'method', 'methodName' => 'solrId', 'storeDb' => false, 'storeSolr' => true), 'title' => array('property' => 'title', 'type' => 'text', 'size' => 100, 'maxLength' => 255, 'label' => 'Title', 'description' => 'The title of the item.', 'required' => true, 'storeDb' => true, 'storeSolr' => true), 'title_proper' => array('property' => 'title_proper', 'type' => 'method', 'storeDb' => false, 'storeSolr' => true), 'title_sort' => array('property' => 'title_sort', 'type' => 'method', 'storeDb' => false, 'storeSolr' => true), 'format_category' => array('property' => 'format_category', 'type' => 'method', 'storeDb' => false, 'storeSolr' => true), 'format' => array('property' => 'format', 'type' => 'method', 'storeDb' => false, 'storeSolr' => true), 'description' => array('property' => 'description', 'type' => 'textarea', 'label' => 'Description', 'rows' => 3, 'cols' => 80, 'description' => 'A brief description of the file for indexing and display if there is not an existing record within the catalog.', 'required' => false, 'storeDb' => true, 'storeSolr' => true), 'num_titles' => array('property' => 'num_titles', 'type' => 'method', 'storeDb' => false, 'storeSolr' => true), 'num_holdings' => array('property' => 'num_holdings', 'type' => 'method', 'storeDb' => false, 'storeSolr' => true), 'format_boost' => array('property' => 'format_boost', 'type' => 'method', 'storeDb' => false, 'storeSolr' => true), 'language_boost' => array('property' => 'language_boost', 'type' => 'method', 'storeDb' => false, 'storeSolr' => true), 'contents' => array('property' => 'contents', 'type' => 'method', 'required' => false, 'storeDb' => false, 'storeSolr' => true), 'bib_suppression' => array('property' => 'bib_suppression', 'type' => 'method', 'storeDb' => false, 'storeSolr' => true), 'owning_library' => array('property' => 'owning_library', 'type' => 'method', 'methodName' => 'institution', 'storeDb' => false, 'storeSolr' => true), 'owning_location' => array('property' => 'owning_location', 'type' => 'method', 'methodName' => 'building', 'storeDb' => false, 'storeSolr' => true), 'usable_by' => array('property' => 'usable_by', 'type' => 'method', 'methodName' => 'usable_by', 'storeDb' => false, 'storeSolr' => true));
     //Add local formats
     $library = new Library();
     $library->find();
     while ($library->fetch() == true) {
         $structure['format_' . $library->subdomain] = array('property' => 'format_' . $library->subdomain, 'type' => 'method', 'methodName' => 'format', 'storeDb' => false, 'storeSolr' => true);
     }
     $location = new Location();
     $location->find();
     while ($location->fetch() == true) {
         $structure['format_' . $location->code] = array('property' => 'format_' . $location->code, 'type' => 'method', 'methodName' => 'format', 'storeDb' => false, 'storeSolr' => true);
     }
     return $structure;
 }
开发者ID:victorfcm,项目名称:VuFind-Plus,代码行数:16,代码来源:UserList.php

示例15: getLibraryForLocation

 static function getLibraryForLocation($locationId)
 {
     if (isset($locationId)) {
         $libLookup = new Library();
         require_once ROOT_DIR . '/Drivers/marmot_inc/Location.php';
         $libLookup->whereAdd('libraryId = (SELECT libraryId FROM location WHERE locationId = ' . $libLookup->escape($locationId) . ')');
         $libLookup->find();
         if ($libLookup->N > 0) {
             $libLookup->fetch();
             return clone $libLookup;
         }
     }
     return null;
 }
开发者ID:victorfcm,项目名称:VuFind-Plus,代码行数:14,代码来源:Library.php


注:本文中的Library::fetch方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。