本文整理汇总了PHP中Location::getUserHomeLocation方法的典型用法代码示例。如果您正苦于以下问题:PHP Location::getUserHomeLocation方法的具体用法?PHP Location::getUserHomeLocation怎么用?PHP Location::getUserHomeLocation使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Location
的用法示例。
在下文中一共展示了Location::getUserHomeLocation方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct($searchObject, $params)
{
global $library;
global $configArray;
// Save the basic parameters:
$this->searchObject = $searchObject;
// Parse the additional parameters:
$params = explode(':', $params);
$section = empty($params[0]) ? 'ResultsTop' : $params[0];
$iniFile = isset($params[1]) ? $params[1] : 'facets';
// Load the desired facet information:
$searchLibrary = Library::getActiveLibrary();
$searchLocation = Location::getActiveLocation();
$config = getExtraConfigArray($iniFile);
if ($searchObject->getSearchType() == 'genealogy') {
$this->mainFacets = array();
} else {
$searchLibrary = Library::getActiveLibrary();
$searchLocation = Location::getActiveLocation();
$userLocation = Location::getUserHomeLocation();
$hasSearchLibraryFacets = $searchLibrary != null && count($searchLibrary->facets) > 0;
$hasSearchLocationFacets = $searchLocation != null && count($searchLocation->facets) > 0;
if ($hasSearchLocationFacets) {
$facets = $searchLocation->facets;
} elseif ($hasSearchLibraryFacets) {
$facets = $searchLibrary->facets;
} else {
$facets = Library::getDefaultFacets();
}
foreach ($facets as $facet) {
if ($facet->showAboveResults == 1) {
$facetName = $facet->facetName;
if (isset($searchLibrary)) {
if ($facet->facetName == 'availability_toggle' && $configArray['Index']['enableDetailedAvailability']) {
$facetName = 'availability_toggle_' . $searchLibrary->subdomain;
}
}
if (isset($userLocation)) {
if ($facet->facetName == 'availability_toggle' && $configArray['Index']['enableDetailedAvailability']) {
$facetName = 'availability_toggle_' . $userLocation->code;
}
}
if (isset($searchLocation)) {
if ($facet->facetName == 'availability_toggle' && $configArray['Index']['enableDetailedAvailability']) {
$facetName = 'availability_toggle_' . $searchLocation->code;
}
}
$this->facets[$facetName] = $facet->displayName;
$this->facetSettings[$facetName] = $facet;
}
}
}
// Load other relevant settings:
$this->baseSettings = array('rows' => $config['Results_Settings']['top_rows'], 'cols' => $config['Results_Settings']['top_cols']);
}
示例2: __construct
public function __construct($searchObject, $params)
{
global $configArray;
// Save the basic parameters:
/** @var SearchObject_Solr|SearchObject_Base searchObject */
$this->searchObject = $searchObject;
// Parse the additional parameters:
$params = explode(':', $params);
$iniFile = isset($params[1]) ? $params[1] : 'facets';
// Load the desired facet information:
$config = getExtraConfigArray($iniFile);
if ($this->searchObject->getSearchType() == 'genealogy') {
$this->mainFacets = array();
} else {
$searchLibrary = Library::getActiveLibrary();
global $locationSingleton;
$searchLocation = $locationSingleton->getActiveLocation();
$userLocation = Location::getUserHomeLocation();
$hasSearchLibraryFacets = $searchLibrary != null && count($searchLibrary->facets) > 0;
$hasSearchLocationFacets = $searchLocation != null && count($searchLocation->facets) > 0;
if ($hasSearchLocationFacets) {
$facets = $searchLocation->facets;
} elseif ($hasSearchLibraryFacets) {
$facets = $searchLibrary->facets;
} else {
$facets = Library::getDefaultFacets();
}
global $solrScope;
foreach ($facets as $facet) {
if ($facet->showAboveResults == 1) {
$facetName = $facet->facetName;
if ($solrScope) {
if ($facet->facetName == 'availability_toggle' && $configArray['Index']['enableDetailedAvailability']) {
$facetName = 'availability_toggle_' . $solrScope;
} else {
if ($facet->facetName == 'format_category' && $configArray['Index']['enableDetailedFormats']) {
$facetName = 'format_category_' . $solrScope;
}
}
}
$this->facets[$facetName] = $facet->displayName;
$this->facetSettings[$facetName] = $facet;
if (!$solrScope && $facet->facetName == 'availability_toggle') {
//Don't do availability toggles in the global scope.
//TODO: Base this off the default scope (i.e. mercury/responsive).
unset($this->facets[$facetName]);
unset($this->facetSettings[$facetName]);
}
}
}
}
// Load other relevant settings:
$this->baseSettings = array('rows' => $config['Results_Settings']['top_rows'], 'cols' => $config['Results_Settings']['top_cols']);
}
示例3: loadLibraryLocationInformation
private static function loadLibraryLocationInformation()
{
if (MillenniumDriver::$libraryLocationInformationLoaded == false) {
//Get a list of all locations for the active library
global $library;
global $timer;
$userLibrary = Library::getPatronHomeLibrary();
MillenniumDriver::$libraryLocations = array();
MillenniumDriver::$libraryLocationLabels = array();
$libraryLocation = new Location();
if ($userLibrary) {
$libraryLocation->libraryId = $userLibrary->libraryId;
$libraryLocation->find();
while ($libraryLocation->fetch()) {
MillenniumDriver::$libraryLocations[] = $libraryLocation->code;
MillenniumDriver::$libraryLocationLabels[$libraryLocation->code] = $libraryLocation->facetLabel;
}
} else {
$libraryLocation->libraryId = $library->libraryId;
$libraryLocation->find();
while ($libraryLocation->fetch()) {
MillenniumDriver::$libraryLocations[] = $libraryLocation->code;
MillenniumDriver::$libraryLocationLabels[$libraryLocation->code] = $libraryLocation->facetLabel;
}
}
MillenniumDriver::$homeLocationCode = null;
MillenniumDriver::$homeLocationLabel = null;
$searchLocation = Location::getSearchLocation();
if ($searchLocation) {
MillenniumDriver::$homeLocationCode = $searchLocation->code;
MillenniumDriver::$homeLocationLabel = $searchLocation->facetLabel;
} else {
$homeLocation = Location::getUserHomeLocation();
if ($homeLocation) {
MillenniumDriver::$homeLocationCode = $homeLocation->code;
MillenniumDriver::$homeLocationLabel = $homeLocation->facetLabel;
}
}
$timer->logTime("Finished loading location data");
MillenniumDriver::$scopingLocationCode = '';
$searchLibrary = Library::getSearchLibrary();
$searchLocation = Location::getSearchLocation();
if (isset($searchLibrary)) {
MillenniumDriver::$scopingLocationCode = $searchLibrary->ilsCode;
}
if (isset($searchLocation)) {
MillenniumDriver::$scopingLocationCode = $searchLocation->code;
}
MillenniumDriver::$libraryLocationInformationLoaded = true;
}
}
示例4: loginUser
function loginUser()
{
//Login the user. Must be called via Post parameters.
global $user;
global $interface;
$user = UserAccount::isLoggedIn();
if (!$user || PEAR_Singleton::isError($user)) {
$user = UserAccount::login();
$interface->assign('user', $user);
if (!$user || PEAR_Singleton::isError($user)) {
return array('success' => false, 'message' => translate("Sorry that login information was not recognized, please try again."));
}
}
$patronHomeBranch = Location::getUserHomeLocation();
//Check to see if materials request should be activated
require_once ROOT_DIR . '/sys/MaterialsRequest.php';
return array('success' => true, 'name' => ucwords($user->firstname . ' ' . $user->lastname), 'phone' => $user->phone, 'email' => $user->email, 'homeLocation' => isset($patronHomeBranch) ? $patronHomeBranch->code : '', 'homeLocationId' => isset($patronHomeBranch) ? $patronHomeBranch->locationId : '', 'enableMaterialsRequest' => MaterialsRequest::enableMaterialsRequest(true));
}
示例5: getItemsFast
public function getItemsFast()
{
global $configArray;
if ($this->fastItems == null) {
$searchLibrary = Library::getSearchLibrary();
if ($searchLibrary) {
$libraryLocationCode = $searchLibrary->ilsCode;
}
$searchLocation = Location::getSearchLocation();
if ($searchLocation) {
$homeLocationCode = $searchLocation->code;
} else {
$homeLocation = Location::getUserHomeLocation();
if ($homeLocation) {
$homeLocationCode = $homeLocation->code;
}
}
$this->fastItems = array();
if ($this->itemsFromIndex) {
$this->fastItems = array();
foreach ($this->itemsFromIndex as $itemData) {
$isLocalItem = false;
$isLibraryItem = false;
if (array_key_exists('item', $itemData)) {
$itemId = $itemData['item'][0];
$locationCode = $itemData['item'][1];
$shelfLocation = mapValue('shelf_location', $locationCode);
$sharing = $itemData['item'][3];
$source = $itemData['item'][4];
$fileOrUrl = '';
if (count($itemData['item']) > 5) {
$fileOrUrl = $itemData['item'][5];
}
if (array_key_exists('scope', $itemData)) {
$isLocalItem = $itemData['scope'][1] == 'true';
$isLibraryItem = $itemData['scope'][2] == 'true';
}
} else {
$itemId = $itemData[1];
$locationCode = $itemData[2];
$shelfLocation = mapValue('shelf_location', $itemData[2]);
$sharing = $itemData[4];
$source = $itemData[5];
$fileOrUrl = '';
if (count($itemData) > 6) {
$fileOrUrl = $itemData[6];
}
$isLocalItem = isset($libraryLocationCode) && strlen($libraryLocationCode) > 0 && strpos($locationCode, $libraryLocationCode) === 0;
$isLibraryItem = isset($homeLocationCode) && strlen($homeLocationCode) > 0 && strpos($locationCode, $homeLocationCode) === 0;
}
$actions = $this->getActionsForItem($itemId, $fileOrUrl, null);
$libraryLabelObj = new Library();
$libraryLabelObj->whereAdd("'{$locationCode}' LIKE CONCAT(ilsCode, '%') and ilsCode <> ''");
$libraryLabelObj->selectAdd();
$libraryLabelObj->selectAdd('displayName');
if ($libraryLabelObj->find(true)) {
$libraryLabel = $libraryLabelObj->displayName;
} else {
$libraryLabel = $locationCode . ' Online';
}
//TODO: Get the correct number of available copies
$totalCopies = 1;
$this->fastItems[] = array('itemId' => $itemId, 'location' => $locationCode, 'callnumber' => '', 'availability' => $this->isItemAvailable($itemId, $totalCopies), 'holdable' => $this->isEContentHoldable($locationCode, $itemData), 'inLibraryUseOnly' => false, 'isLocalItem' => $isLocalItem, 'isLibraryItem' => $isLibraryItem, 'locationLabel' => 'Online', 'libraryLabel' => $libraryLabel, 'shelfLocation' => $shelfLocation, 'source' => 'Online ' . $source, 'sharing' => $sharing, 'actions' => $actions);
}
} else {
/** @var File_MARC_Data_Field[] $itemFields */
$itemFields = $this->getMarcRecord()->getFields('989');
foreach ($itemFields as $itemField) {
$locationCode = trim($itemField->getSubfield('d') != null ? $itemField->getSubfield('d')->getData() : '');
//Each item can have multiple item fields
/** @var File_MARC_Subfield[] $eContentFields */
$eContentFields = $itemField->getSubfields('w');
$itemId = $itemField->getSubfield('1')->getData();
$iType = $itemField->getSubfield($configArray['Reindex']['iTypeSubfield'])->getData();
foreach ($eContentFields as $eContentField) {
$eContentData = trim($eContentField->getData() != null ? $eContentField->getData() : '');
if ($eContentData && strpos($eContentData, ':') > 0) {
$eContentFieldData = explode(':', $eContentData);
$source = trim($eContentFieldData[0]);
$protectionType = strtolower(trim($eContentFieldData[1]));
$totalCopies = 1;
if ($this->isValidProtectionType($protectionType)) {
if ($this->isValidForUser($locationCode, $eContentFieldData)) {
$libraryLabelObj = new Library();
$libraryLabelObj->whereAdd("'{$locationCode}' LIKE CONCAT(ilsCode, '%') and ilsCode <> ''");
$libraryLabelObj->selectAdd();
$libraryLabelObj->selectAdd('displayName');
if ($libraryLabelObj->find(true)) {
$libraryLabel = $libraryLabelObj->displayName;
} else {
$libraryLabel = $locationCode . ' Online';
}
$locationLabelObj = new Location();
$locationLabelObj->whereAdd("'{$locationCode}' LIKE CONCAT(code, '%') and code <> ''");
if ($locationLabelObj->find(true)) {
$locationLabel = $locationLabelObj->displayName;
} else {
$locationLabel = $locationCode . ' Online';
}
//Get the file or url that is related to this item.
//.........这里部分代码省略.........
示例6: launch
function launch()
{
global $interface;
global $configArray;
global $user;
//Get a list of all reports the user has access to
$reportDir = $configArray['Site']['reportPath'];
$allowableLocationCodes = "";
if ($user->hasRole('opacAdmin')) {
$allowableLocationCodes = '.*';
} elseif ($user->hasRole('libraryAdmin')) {
$homeLibrary = Library::getPatronHomeLibrary();
$allowableLocationCodes = trim($homeLibrary->ilsCode) . '.*';
} elseif ($user->hasRole('locationReports')) {
$homeLocation = Location::getUserHomeLocation();
$allowableLocationCodes = trim($homeLocation->code) . '.*';
}
$availableReports = array();
$dh = opendir($reportDir);
while (false !== ($filename = readdir($dh))) {
if (is_file($reportDir . '/' . $filename)) {
if (preg_match('/(\\w+)_school_report\\.csv/i', $filename, $matches)) {
$locationCode = $matches[1];
if (preg_match("/{$allowableLocationCodes}/", $locationCode)) {
$availableReports[$locationCode] = $filename;
}
}
}
}
ksort($availableReports);
$interface->assign('availableReports', $availableReports);
$selectedReport = isset($_REQUEST['selectedReport']) ? $availableReports[$_REQUEST['selectedReport']] : reset($availableReports);
$interface->assign('selectedReport', $selectedReport);
$showOverdueOnly = isset($_REQUEST['showOverdueOnly']) ? $_REQUEST['showOverdueOnly'] == 'overdue' : true;
$interface->assign('showOverdueOnly', $showOverdueOnly);
$now = time();
$fileData = array();
if ($selectedReport) {
$fhnd = fopen($reportDir . '/' . $selectedReport, "r");
if ($fhnd) {
while (($data = fgetcsv($fhnd)) !== FALSE) {
$okToInclude = true;
if ($showOverdueOnly) {
$dueDate = $data[12];
$dueTime = strtotime($dueDate);
if ($dueTime >= $now) {
$okToInclude = false;
}
}
if ($okToInclude || count($fileData) == 0) {
$fileData[] = $data;
}
}
$interface->assign('reportData', $fileData);
}
}
if (isset($_REQUEST['download'])) {
header('Content-Type: text/csv');
header('Content-Disposition: attachment; filename=' . $selectedReport);
header('Content-Length:' . filesize($reportDir . '/' . $selectedReport));
foreach ($fileData as $row) {
foreach ($row as $index => $cell) {
if ($index != 0) {
echo ",";
}
if (strpos($cell, ',') != false) {
echo '"' . $cell . '"';
} else {
echo $cell;
}
}
echo "\r\n";
}
exit;
}
$interface->setPageTitle('Student Report');
$interface->assign('sidebar', 'MyAccount/account-sidebar.tpl');
$interface->setTemplate('studentReport.tpl');
$interface->display('layout.tpl');
}
示例7: __construct
public function __construct($searchObject, $params)
{
global $configArray;
// Save the passed-in SearchObject:
$this->searchObject = $searchObject;
// Parse the additional settings:
$params = explode(':', $params);
$mainSection = empty($params[0]) ? 'Results' : $params[0];
$checkboxSection = isset($params[1]) ? $params[1] : false;
$iniName = isset($params[2]) ? $params[2] : 'facets';
if ($searchObject->getSearchType() == 'genealogy') {
$config = getExtraConfigArray($iniName);
$this->mainFacets = isset($config[$mainSection]) ? $config[$mainSection] : array();
} else {
$searchLibrary = Library::getActiveLibrary();
global $locationSingleton;
$searchLocation = $locationSingleton->getActiveLocation();
$userLocation = Location::getUserHomeLocation();
$hasSearchLibraryFacets = $searchLibrary != null && count($searchLibrary->facets) > 0;
$hasSearchLocationFacets = $searchLocation != null && count($searchLocation->facets) > 0;
if ($hasSearchLocationFacets) {
$facets = $searchLocation->facets;
} elseif ($hasSearchLibraryFacets) {
$facets = $searchLibrary->facets;
} else {
$facets = Library::getDefaultFacets();
}
$this->facetSettings = array();
$this->mainFacets = array();
foreach ($facets as $facet) {
$facetName = $facet->facetName;
//Adjust facet name for local scoping
if (isset($searchLibrary)) {
if ($facet->facetName == 'time_since_added') {
$facetName = 'local_time_since_added_' . $searchLibrary->subdomain;
} elseif ($facet->facetName == 'itype') {
$facetName = 'itype_' . $searchLibrary->subdomain;
} elseif ($facet->facetName == 'detailed_location') {
$facetName = 'detailed_location_' . $searchLibrary->subdomain;
} elseif ($facet->facetName == 'availability_toggle' && $configArray['Index']['enableDetailedAvailability']) {
$facetName = 'availability_toggle_' . $searchLibrary->subdomain;
}
}
if (isset($userLocation)) {
if ($facet->facetName == 'availability_toggle' && $configArray['Index']['enableDetailedAvailability']) {
$facetName = 'availability_toggle_' . $userLocation->code;
}
}
if (isset($searchLocation)) {
if ($facet->facetName == 'time_since_added' && $searchLocation->restrictSearchByLocation) {
$facetName = 'local_time_since_added_' . $searchLocation->code;
} elseif ($facet->facetName == 'availability_toggle' && $configArray['Index']['enableDetailedAvailability']) {
$facetName = 'availability_toggle_' . $searchLocation->code;
}
}
//Figure out if the facet should be included
if ($mainSection == 'Results') {
if ($facet->showInResults == 1 && $facet->showAboveResults == 0) {
$this->facetSettings[$facetName] = $facet;
$this->mainFacets[$facetName] = $facet->displayName;
} elseif ($facet->showInAdvancedSearch == 1 && $facet->showAboveResults == 0) {
$this->facetSettings[$facetName] = $facet->displayName;
}
} elseif ($mainSection == 'Author') {
if ($facet->showInAuthorResults == 1 && $facet->showAboveResults == 0) {
$this->facetSettings[$facetName] = $facet;
$this->mainFacets[$facetName] = $facet->displayName;
}
}
}
}
$this->checkboxFacets = $checkboxSection && isset($config[$checkboxSection]) ? $config[$checkboxSection] : array();
}
示例8: validateTextId
function validateTextId()
{
//Setup validation return array
$validationResults = array('validatedOk' => true, 'errors' => array());
if (!$this->textId || strlen($this->textId) == 0) {
$this->textId = $this->label . ' ' . $this->sharing;
if ($this->sharing == 'private') {
$this->textId .= '_' . $this->userId;
} elseif ($this->sharing == 'location') {
$location = Location::getUserHomeLocation();
$this->textId .= '_' . $location->code;
} elseif ($this->sharing == 'library') {
global $library;
$this->textId .= '_' . $library->getPatronHomeLibrary()->subdomain;
}
}
//First convert the text id to all lower case
$this->textId = strtolower($this->textId);
//Next convert any non word characters to an underscore
$this->textId = preg_replace('/\\W/', '_', $this->textId);
//Make sure the length is less than 50 characters
if (strlen($this->textId) > 50) {
$this->textId = substr($this->textId, 0, 50);
}
return $validationResults;
}
示例9: initAdvancedFacets
/**
* Initialise the object for retrieving advanced
* search screen facet data from inside solr.
*
* @access public
* @return boolean
*/
public function initAdvancedFacets()
{
global $configArray;
global $locationSingleton;
// Call the standard initialization routine in the parent:
parent::init();
$searchLibrary = Library::getActiveLibrary();
$searchLocation = $locationSingleton->getActiveLocation();
/** @var Location $userLocation */
$userLocation = Location::getUserHomeLocation();
$hasSearchLibraryFacets = $searchLibrary != null && count($searchLibrary->facets) > 0;
$hasSearchLocationFacets = $searchLocation != null && count($searchLocation->facets) > 0;
if ($hasSearchLocationFacets) {
$facets = $searchLocation->facets;
} elseif ($hasSearchLibraryFacets) {
$facets = $searchLibrary->facets;
} else {
$facets = Library::getDefaultFacets();
}
$this->facetConfig = array();
foreach ($facets as $facet) {
$facetName = $facet->facetName;
//Adjust facet name for local scoping
if (isset($searchLibrary)) {
if ($facet->facetName == 'time_since_added') {
$facetName = 'local_time_since_added_' . $searchLibrary->subdomain;
} elseif ($facet->facetName == 'itype') {
$facetName = 'itype_' . $searchLibrary->subdomain;
} elseif ($facet->facetName == 'detailed_location') {
$facetName = 'detailed_location_' . $searchLibrary->subdomain;
} elseif ($facet->facetName == 'availability_toggle' && $configArray['Index']['enableDetailedAvailability']) {
$facetName = 'availability_toggle_' . $searchLibrary->subdomain;
}
}
if (isset($userLocation)) {
if ($facet->facetName == 'availability_toggle' && $configArray['Index']['enableDetailedAvailability']) {
$facetName = 'availability_toggle_' . $userLocation->code;
}
}
if (isset($searchLocation)) {
if ($facet->facetName == 'time_since_added' && $searchLocation->restrictSearchByLocation) {
$facetName = 'local_time_since_added_' . $searchLocation->code;
} elseif ($facet->facetName == 'availability_toggle' && $configArray['Index']['enableDetailedAvailability']) {
$facetName = 'availability_toggle_' . $searchLocation->code;
}
}
if ($facet->showInAdvancedSearch) {
$this->facetConfig[$facetName] = $facet->displayName;
}
}
//********************
$facetLimit = $this->getFacetSetting('Advanced_Settings', 'facet_limit');
if (is_numeric($facetLimit)) {
$this->facetLimit = $facetLimit;
}
// Spellcheck is not needed for facet data!
$this->spellcheck = false;
//********************
// Basic Search logic
$this->searchTerms[] = array('index' => $this->defaultIndex, 'lookfor' => "");
return true;
}
示例10: addFilter
/**
* Take a filter string and add it into the protected
* array checking for duplicates.
*
* @access public
* @param string $newFilter A filter string from url : "field:value"
*/
public function addFilter($newFilter)
{
global $configArray;
// Extract field and value from URL string:
list($field, $value) = $this->parseFilter($newFilter);
$searchLibrary = Library::getActiveLibrary();
global $locationSingleton;
$searchLocation = $locationSingleton->getActiveLocation();
$userLocation = Location::getUserHomeLocation();
global $solrScope;
// Check for duplicates -- if it's not in the array, we can add it
if (!$this->hasFilter($newFilter)) {
if ($field == 'literary-form') {
$field = 'literary_form';
} else {
if ($field == 'literary-form-full') {
$field = 'literary_form_full';
} else {
if ($field == 'target-audience') {
$field = 'target_audience';
} else {
if ($field == 'target-audience-full') {
$field = 'target_audience_full';
}
}
}
}
//See if the filter should be localized
if (isset($searchLibrary)) {
if ($field == 'time_since_added') {
$field = 'local_time_since_added_' . $searchLibrary->subdomain;
} elseif ($field == 'itype') {
$field = 'itype_' . $searchLibrary->subdomain;
} elseif ($field == 'detailed_location') {
$field = 'detailed_location_' . $searchLibrary->subdomain;
}
}
if ($solrScope) {
if ($field == 'availability_toggle' && $configArray['Index']['enableDetailedAvailability']) {
$field = 'availability_toggle_' . $solrScope;
} elseif ($field == 'format' && $configArray['Index']['enableDetailedFormats']) {
$field = 'format_' . $solrScope;
} elseif ($field == 'format_category' && $configArray['Index']['enableDetailedFormats']) {
$field = 'format_category_' . $solrScope;
} elseif ($field == 'econtent_source' && $configArray['Index']['enableDetailedEContentSources']) {
$field = 'econtent_source_' . $solrScope;
} elseif ($field == 'econtent_protection_type' && $configArray['Index']['enableDetailedEContentSources']) {
$field = 'econtent_protection_type_' . $solrScope;
}
}
if (isset($userLocation)) {
if ($field == 'availability_toggle' && $configArray['Index']['enableDetailedAvailability']) {
$field = 'availability_toggle_' . $userLocation->code;
}
}
if (isset($searchLocation)) {
if ($field == 'time_since_added' && $searchLocation->restrictSearchByLocation) {
$field = 'local_time_since_added_' . $searchLocation->code;
} elseif ($field == 'availability_toggle' && $configArray['Index']['enableDetailedAvailability']) {
$field = 'availability_toggle_' . $searchLocation->code;
}
}
$this->filterList[$field][] = $value;
}
}