Documentation

TextNavigationService

Service class for text navigation.

Tags
category

Lwt

author

HugoFara hugo.farajallah@protonmail.com

license

Unlicense http://unlicense.org/

link
https://hugofara.github.io/lwt/docs/php/
since
3.0.0

Table of Contents

Methods

getPreviousAndNextTextLinks()  : string
Return navigation arrows to previous and next texts.
getTextTitle()  : string
Get the title of a text by its ID.
buildNavigationUrl()  : string
Build the URL for navigation by replacing {id} placeholder or appending ID.

Methods

Return navigation arrows to previous and next texts.

public getPreviousAndNextTextLinks(int $textId, string $url, bool $onlyAnn, string $add) : string
Parameters
$textId : int

ID of the current text

$url : string

Base URL to append before $textId, or pattern with {id} placeholder

$onlyAnn : bool

Restrict to annotated texts only

$add : string

Some content to add before the output

Return values
string

Arrows to previous and next texts.

getTextTitle()

Get the title of a text by its ID.

public static getTextTitle(int $textId) : string
Parameters
$textId : int

Text ID

Return values
string

Text title, or empty string if not found

buildNavigationUrl()

Build the URL for navigation by replacing {id} placeholder or appending ID.

private buildNavigationUrl(string $url, int $textId) : string
Parameters
$url : string

URL pattern (may contain {id} placeholder or be a query param base)

$textId : int

Text ID to insert

Return values
string

Complete URL with text ID


        
On this page

Search results