Skip to content

Commit

Permalink
Update class variable and method names
Browse files Browse the repository at this point in the history
  • Loading branch information
dltj committed Aug 16, 2024
1 parent 643130e commit ce29719
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
4 changes: 2 additions & 2 deletions module/VuFind/src/VuFind/ILS/Driver/Folio.php
Original file line number Diff line number Diff line change
Expand Up @@ -874,7 +874,7 @@ public function getHolding($bibId, array $patron = null, array $options = [])
$nextBatch[] = $nextItem;
}

// If there are no item records at this location, we're going to create a fake one,
// If there are no item records on this holding, we're going to create a fake one,
// fill it with data from the FOLIO holdings record, and make it not appear in
// the full record display using a non-visible AvailabilityStatus.
if ($number == 0) {
Expand All @@ -883,7 +883,7 @@ public function getHolding($bibId, array $patron = null, array $options = [])
true,
'HoldingStatus::holding_no_items_availability_message'
);
$invisibleAvailabilityStatus->setVisibility(false);
$invisibleAvailabilityStatus->setVisibilityInHoldings(false);
$nextBatch[] = $locAndHoldings + [
'id' => $bibId,
'callnumber' => $holdingDetails['holdingCallNumber'],
Expand Down
11 changes: 5 additions & 6 deletions module/VuFind/src/VuFind/ILS/Logic/AvailabilityStatus.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class AvailabilityStatus implements AvailabilityStatusInterface
*
* @var bool
*/
protected bool $visibility = true;
protected bool $visibilityInHoldingsTab = true;

/**
* Constructor
Expand Down Expand Up @@ -100,20 +100,19 @@ public function is(int $availability): bool
*/
public function isVisibleInHoldings(): bool
{
// Can be overridden if the status should not be visible in the holdings tab,
return true;
return $this->visibilityInHoldingsTab;
}

/**
* Set visibility in holdings tab.
*
* @param bool $visibility Visibility toggle
* @param bool $visibilityInHoldingsTab Visibility toggle
*
* @return AvailabilityStatus
*/
public function setVisibility(bool $visibility): AvailabilityStatus
public function setVisibilityInHoldings(bool $visibilityInHoldingsTab): AvailabilityStatus
{
$this->visibility = $visibility;
$this->visibilityInHoldingsTab = $visibilityInHoldingsTab;
return $this;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,11 @@ public function isVisibleInHoldings(): bool;
/**
* Set visibility status.
*
* @param bool $visibility Visibility toggle
* @param bool $visibilityInHoldingsTab Visibility toggle
*
* @return AvailabilityStatus
*/
public function setVisibility(bool $visibility): AvailabilityStatus;
public function setVisibilityInHoldings(bool $visibilityInHoldingsTab): AvailabilityStatus;

/**
* Get status description.
Expand Down

0 comments on commit ce29719

Please sign in to comment.