System update (API update)
This commit is contained in:
parent
a18433bb83
commit
e20a43dba0
6 changed files with 52 additions and 17 deletions
|
@ -1204,33 +1204,62 @@ class YellowPageCollection extends ArrayObject
|
|||
return $this->paginationCount;
|
||||
}
|
||||
|
||||
// Return absolute location for a page in pagination
|
||||
function getPaginationLocation($pageNumber)
|
||||
// Return location for a page in pagination
|
||||
function getPaginationLocation($absoluteLocation = true, $pageNumber = 1)
|
||||
{
|
||||
if($pageNumber>=1 && $pageNumber<=$this->paginationCount)
|
||||
{
|
||||
$pagination = $this->yellow->config->get("contentPagination");
|
||||
$location = $this->yellow->page->getLocation(true);
|
||||
$location = $this->yellow->page->getLocation($absoluteLocation);
|
||||
$locationArgs = $this->yellow->toolbox->getLocationArgsNew(
|
||||
$pageNumber>1 ? "$pagination:$pageNumber" : "$pagination:", $pagination);
|
||||
}
|
||||
return $location.$locationArgs;
|
||||
}
|
||||
|
||||
// Return absolute location for previous page in pagination
|
||||
function getPaginationPrevious()
|
||||
// Return location for previous page in pagination
|
||||
function getPaginationPrevious($absoluteLocation = true)
|
||||
{
|
||||
$pageNumber = $this->paginationNumber;
|
||||
$pageNumber = ($pageNumber>1 && $pageNumber<=$this->paginationCount) ? $pageNumber-1 : 0;
|
||||
return $this->getPaginationLocation($pageNumber);
|
||||
$pageNumber = $this->paginationNumber-1;
|
||||
return $this->getPaginationLocation($absoluteLocation, $pageNumber);
|
||||
}
|
||||
|
||||
// Return absolute location for next page in pagination
|
||||
function getPaginationNext()
|
||||
// Return location for next page in pagination
|
||||
function getPaginationNext($absoluteLocation = true)
|
||||
{
|
||||
$pageNumber = $this->paginationNumber;
|
||||
$pageNumber = ($pageNumber>=1 && $pageNumber<$this->paginationCount) ? $pageNumber+1 : 0;
|
||||
return $this->getPaginationLocation($pageNumber);
|
||||
$pageNumber = $this->paginationNumber+1;
|
||||
return $this->getPaginationLocation($absoluteLocation, $pageNumber);
|
||||
}
|
||||
|
||||
// Return current page number in collection
|
||||
function getPageNumber($page)
|
||||
{
|
||||
$pageNumber = 0;
|
||||
foreach($this->getIterator() as $key=>$value)
|
||||
{
|
||||
if($page->getLocation()==$value->getLocation()) { $pageNumber = $key+1; break; }
|
||||
}
|
||||
return $pageNumber;
|
||||
}
|
||||
|
||||
// Return page in collection, null if none
|
||||
function getPage($pageNumber = 1)
|
||||
{
|
||||
return ($pageNumber>=1 && $pageNumber<=$this->count()) ? $this->offsetGet($pageNumber-1) : null;
|
||||
}
|
||||
|
||||
// Return previous page in collection, null if none
|
||||
function getPagePrevious($page)
|
||||
{
|
||||
$pageNumber = $this->getPageNumber($page)-1;
|
||||
return $this->getPage($pageNumber);
|
||||
}
|
||||
|
||||
// Return next page in collection, null if none
|
||||
function getPageNext($page)
|
||||
{
|
||||
$pageNumber = $this->getPageNumber($page)+1;
|
||||
return $this->getPage($pageNumber);
|
||||
}
|
||||
|
||||
// Return current page filter
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
Language: de
|
||||
LanguageDescription: Deutsch
|
||||
LanguageTranslator: David Fehrmann
|
||||
LanguageVersion: 0.6.11
|
||||
LanguageVersion: 0.6.12
|
||||
|
||||
BlogBy: von
|
||||
BlogFilter: Blog:
|
||||
|
@ -27,6 +27,8 @@ DateFormatLong: d.m.Y H:i
|
|||
DateFormatTime: H:i
|
||||
PaginationPrevious: ← Zurück
|
||||
PaginationNext: Vor →
|
||||
PagePrevious: ← @title
|
||||
PageNext: @title →
|
||||
SearchQuery: Suche:
|
||||
SearchResultsNone: Bitte einen Suchbegriff eingeben.
|
||||
SearchResultsEmpty: Keine Treffer für diese Suchanfrage.
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
Language: en
|
||||
LanguageDescription: English
|
||||
LanguageTranslator: Mark Seuffert
|
||||
LanguageVersion: 0.6.11
|
||||
LanguageVersion: 0.6.12
|
||||
|
||||
BlogBy: by
|
||||
BlogFilter: Blog:
|
||||
|
@ -27,6 +27,8 @@ DateFormatLong: Y-m-d H:i
|
|||
DateFormatTime: H:i
|
||||
PaginationPrevious: ← Previous
|
||||
PaginationNext: Next →
|
||||
PagePrevious: ← @title
|
||||
PageNext: @title →
|
||||
SearchQuery: Search:
|
||||
SearchResultsNone: Enter a search term.
|
||||
SearchResultsEmpty: No results found.
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
Language: fr
|
||||
LanguageDescription: Français
|
||||
LanguageTranslator: Juh Nibreh
|
||||
LanguageVersion: 0.6.11
|
||||
LanguageVersion: 0.6.12
|
||||
|
||||
BlogBy: par
|
||||
BlogFilter: Blog:
|
||||
|
@ -27,6 +27,8 @@ DateFormatLong: d/m/Y H:i
|
|||
DateFormatTime: H:i
|
||||
PaginationPrevious: ← Précédent
|
||||
PaginationNext: Suivant →
|
||||
PagePrevious: ← @title
|
||||
PageNext: @title →
|
||||
SearchQuery: Rechercher:
|
||||
SearchResultsNone: Entrez un mot dans le champ de recherche.
|
||||
SearchResultsEmpty: Pas de résultats.
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
// Language plugin
|
||||
class YellowLanguage
|
||||
{
|
||||
const VERSION = "0.6.11";
|
||||
const VERSION = "0.6.12";
|
||||
var $yellow; //access to API
|
||||
|
||||
// Handle initialisation
|
||||
|
|
Binary file not shown.
Loading…
Add table
Reference in a new issue