Skip to content

Commit

Permalink
child api model changes
Browse files Browse the repository at this point in the history
  • Loading branch information
nczirjak-acdh committed Sep 9, 2021
1 parent 11f8b94 commit 36b1585
Showing 1 changed file with 0 additions and 34 deletions.
34 changes: 0 additions & 34 deletions src/Model/ChildApiModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,40 +137,6 @@ public function getViewData(string $identifier = "", int $limit = 10, int $page
return $this->data;
}

/**
* Create the order values for the sql
*
* @param string $orderby
* @return object
*/
private function ordering(string $orderby = "titleasc"): object
{
$result = new \stdClass();
$result->property = $this->repo->getSchema()->label;
$result->order = 'asc';

if ($orderby == "titleasc") {
$result->property = $this->repo->getSchema()->label;
$result->order = 'asc';
} elseif ($orderby == "titledesc") {
$result->property = $this->repo->getSchema()->label;
$result->order = 'desc';
} elseif ($orderby == "dateasc") {
$result->property = 'http://fedora.info/definitions/v4/repository#lastModified';
$result->order = 'asc';
} elseif ($orderby == "datedesc") {
$result->property = 'http://fedora.info/definitions/v4/repository#lastModified';
$result->order = 'desc';
} elseif ($orderby == "typeasc") {
$result->property = $this->repo->getSchema()->__get('namespaces')->rdfs . 'type';
$result->order = 'asc';
} elseif ($orderby == "typedesc") {
$result->property = $this->repo->getSchema()->__get('namespaces')->rdfs . 'type';
$result->order = 'desc';
}
return $result;
}

/**
* Get the number of the child resources for the pagination
*
Expand Down

0 comments on commit 36b1585

Please sign in to comment.