Skip to content

Commit

Permalink
Rename methods
Browse files Browse the repository at this point in the history
  • Loading branch information
emodric committed Dec 13, 2024
1 parent 333ff17 commit 1fa482e
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 28 deletions.
4 changes: 2 additions & 2 deletions lib/API/RelationService.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public function loadFieldRelationLocations(
*
* @return \Netgen\IbexaSiteApi\API\Values\Content[]
*/
public function loadReverseRelations(
public function loadReverseFieldRelations(
Content $content,
string $fieldDefinitionIdentifier,
array $contentTypeIdentifiers = [],
Expand All @@ -83,7 +83,7 @@ public function loadReverseRelations(
*
* @return \Netgen\IbexaSiteApi\API\Values\Location[]
*/
public function loadReverseRelationLocations(
public function loadReverseFieldRelationLocations(
Content $content,
string $fieldDefinitionIdentifier,
array $contentTypeIdentifiers = [],
Expand Down
16 changes: 8 additions & 8 deletions lib/API/Values/Content.php
Original file line number Diff line number Diff line change
Expand Up @@ -201,14 +201,14 @@ abstract public function filterSudoFieldRelationLocations(
*
* @return \Netgen\IbexaSiteApi\API\Values\Content[]
*/
abstract public function getReverseRelations(string $fieldDefinitionIdentifier, int $limit = 25): array;
abstract public function getReverseFieldRelations(string $fieldDefinitionIdentifier, int $limit = 25): array;

/**
* Return all reverse related Content from $fieldDefinitionIdentifier using repository sudo.
*
* @return \Netgen\IbexaSiteApi\API\Values\Content[]
*/
abstract public function getSudoReverseRelations(string $fieldDefinitionIdentifier, int $limit = 25): array;
abstract public function getSudoReverseFieldRelations(string $fieldDefinitionIdentifier, int $limit = 25): array;

/**
* Return reverse related Content from $fieldDefinitionIdentifier field,
Expand All @@ -218,7 +218,7 @@ abstract public function getSudoReverseRelations(string $fieldDefinitionIdentifi
*
* @return \Pagerfanta\Pagerfanta Pagerfanta instance iterating over Site API Content items
*/
abstract public function filterReverseRelations(
abstract public function filterReverseFieldRelations(
string $fieldDefinitionIdentifier,
array $contentTypeIdentifiers = [],
int $maxPerPage = 25,
Expand All @@ -233,7 +233,7 @@ abstract public function filterReverseRelations(
*
* @return \Pagerfanta\Pagerfanta Pagerfanta instance iterating over Site API Content items
*/
abstract public function filterSudoReverseRelations(
abstract public function filterSudoReverseFieldRelations(
string $fieldDefinitionIdentifier,
array $contentTypeIdentifiers = [],
int $maxPerPage = 25,
Expand All @@ -245,14 +245,14 @@ abstract public function filterSudoReverseRelations(
*
* @return \Netgen\IbexaSiteApi\API\Values\Location[]
*/
abstract public function getReverseRelationLocations(string $fieldDefinitionIdentifier, int $limit = 25): array;
abstract public function getReverseFieldRelationLocations(string $fieldDefinitionIdentifier, int $limit = 25): array;

/**
* Return all reverse related Locations from $fieldDefinitionIdentifier using repository sudo.
*
* @return \Netgen\IbexaSiteApi\API\Values\Location[]
*/
abstract public function getSudoReverseRelationLocations(string $fieldDefinitionIdentifier, int $limit = 25): array;
abstract public function getSudoReverseFieldRelationLocations(string $fieldDefinitionIdentifier, int $limit = 25): array;

/**
* Return reverse related Locations from $fieldDefinitionIdentifier field,
Expand All @@ -262,7 +262,7 @@ abstract public function getSudoReverseRelationLocations(string $fieldDefinition
*
* @return \Pagerfanta\Pagerfanta Pagerfanta instance iterating over Site API Locations
*/
abstract public function filterReverseRelationLocations(
abstract public function filterReverseFieldRelationLocations(
string $fieldDefinitionIdentifier,
array $contentTypeIdentifiers = [],
int $maxPerPage = 25,
Expand All @@ -277,7 +277,7 @@ abstract public function filterReverseRelationLocations(
*
* @return \Pagerfanta\Pagerfanta Pagerfanta instance iterating over Site API Locations
*/
abstract public function filterSudoReverseRelationLocations(
abstract public function filterSudoReverseFieldRelationLocations(
string $fieldDefinitionIdentifier,
array $contentTypeIdentifiers = [],
int $maxPerPage = 25,
Expand Down
4 changes: 2 additions & 2 deletions lib/Core/Site/RelationService.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ public function loadFieldRelationLocations(
return $locations;
}

public function loadReverseRelations(
public function loadReverseFieldRelations(
Content $content,
string $fieldDefinitionIdentifier,
array $contentTypeIdentifiers = [],
Expand All @@ -169,7 +169,7 @@ public function loadReverseRelations(
return $this->extractContentItems($result);
}

public function loadReverseRelationLocations(
public function loadReverseFieldRelationLocations(
Content $content,
string $fieldDefinitionIdentifier,
array $contentTypeIdentifiers = [],
Expand Down
32 changes: 16 additions & 16 deletions lib/Core/Site/Values/Content.php
Original file line number Diff line number Diff line change
Expand Up @@ -351,30 +351,30 @@ public function filterSudoFieldRelationLocations(
);
}

public function getReverseRelations(string $fieldDefinitionIdentifier, int $limit = 25): array
public function getReverseFieldRelations(string $fieldDefinitionIdentifier, int $limit = 25): array
{
return $this->site->getRelationService()->loadReverseRelations(
return $this->site->getRelationService()->loadReverseFieldRelations(
$this,
$fieldDefinitionIdentifier,
[],
$limit,
);
}

public function getSudoReverseRelations(string $fieldDefinitionIdentifier, int $limit = 25): array
public function getSudoReverseFieldRelations(string $fieldDefinitionIdentifier, int $limit = 25): array
{
return $this->repository->sudo(
fn () => $this->getReverseRelations($fieldDefinitionIdentifier, $limit),
fn () => $this->getReverseFieldRelations($fieldDefinitionIdentifier, $limit),
);
}

public function filterReverseRelations(
public function filterReverseFieldRelations(
string $fieldDefinitionIdentifier,
array $contentTypeIdentifiers = [],
int $maxPerPage = 25,
int $currentPage = 1,
): Pagerfanta {
$relations = $this->site->getRelationService()->loadReverseRelations(
$relations = $this->site->getRelationService()->loadReverseFieldRelations(
$this,
$fieldDefinitionIdentifier,
$contentTypeIdentifiers,
Expand All @@ -389,14 +389,14 @@ public function filterReverseRelations(
return $pager;
}

public function filterSudoReverseRelations(
public function filterSudoReverseFieldRelations(
string $fieldDefinitionIdentifier,
array $contentTypeIdentifiers = [],
int $maxPerPage = 25,
int $currentPage = 1,
): Pagerfanta {
return $this->repository->sudo(
fn () => $this->filterReverseRelations(
fn () => $this->filterReverseFieldRelations(
$fieldDefinitionIdentifier,
$contentTypeIdentifiers,
$maxPerPage,
Expand All @@ -405,30 +405,30 @@ public function filterSudoReverseRelations(
);
}

public function getReverseRelationLocations(string $fieldDefinitionIdentifier, int $limit = 25): array
public function getReverseFieldRelationLocations(string $fieldDefinitionIdentifier, int $limit = 25): array
{
return $this->site->getRelationService()->loadReverseRelationLocations(
return $this->site->getRelationService()->loadReverseFieldRelationLocations(
$this,
$fieldDefinitionIdentifier,
[],
$limit,
);
}

public function getSudoReverseRelationLocations(string $fieldDefinitionIdentifier, int $limit = 25): array
public function getSudoReverseFieldRelationLocations(string $fieldDefinitionIdentifier, int $limit = 25): array
{
return $this->repository->sudo(
fn () => $this->getReverseRelationLocations($fieldDefinitionIdentifier, $limit),
fn () => $this->getReverseFieldRelationLocations($fieldDefinitionIdentifier, $limit),
);
}

public function filterReverseRelationLocations(
public function filterReverseFieldRelationLocations(
string $fieldDefinitionIdentifier,
array $contentTypeIdentifiers = [],
int $maxPerPage = 25,
int $currentPage = 1,
): Pagerfanta {
$relations = $this->site->getRelationService()->loadReverseRelationLocations(
$relations = $this->site->getRelationService()->loadReverseFieldRelationLocations(
$this,
$fieldDefinitionIdentifier,
$contentTypeIdentifiers,
Expand All @@ -443,14 +443,14 @@ public function filterReverseRelationLocations(
return $pager;
}

public function filterSudoReverseRelationLocations(
public function filterSudoReverseFieldRelationLocations(
string $fieldDefinitionIdentifier,
array $contentTypeIdentifiers = [],
int $maxPerPage = 25,
int $currentPage = 1,
): Pagerfanta {
return $this->repository->sudo(
fn () => $this->filterReverseRelationLocations(
fn () => $this->filterReverseFieldRelationLocations(
$fieldDefinitionIdentifier,
$contentTypeIdentifiers,
$maxPerPage,
Expand Down

0 comments on commit 1fa482e

Please sign in to comment.