Documentation

ajax_edit_impr_text.php

\file \brief Display table for Improved Annotation (Edit Mode),

Ajax call in print_impr_text.php Call: inc/ajax_edit_impr_text.php?id=[textid]

Tags
author

LWT Project lwt-project@hotmail.com

license

Unlicense http://unlicense.org/

link
https://hugofara.github.io/lwt/docs/php/files/inc-ajax-edit-impr-text.html
since
1.5.0

Table of Contents

Functions

make_trans()  : string
Make the translations choices for a term.
get_translations()  : array<string|int, string>
Find the possible translations for a term.
get_term_translations()  : array<string|int, array<string|int, mixed>|int|null|string>
Gather useful data to edit a term annotation on a specific text.
edit_term_interaction()  : string
Prepare the HTML content for the interaction with a term
edit_term_form()  : string
Full form for terms edition in a given text.
make_form()  : array<string|int, string>
Prepare the form for printed text.
do_ajax_edit_impr_text()  : void
Do the AJAX modification for editing a printed text.

Functions

make_trans()

Make the translations choices for a term.

make_trans(int $i, int|null $wid, string $trans, string $word, int $lang) : string
Parameters
$i : int

Word unique index in the form

$wid : int|null

Word ID or null

$trans : string

Current translation set for the term, may be empty

$word : string

Term text

$lang : int

Language ID

Return values
string

HTML-formatted string

get_translations()

Find the possible translations for a term.

get_translations(int $word_id) : array<string|int, string>
Parameters
$word_id : int

Term ID

Tags
psalm-return

list

Return values
array<string|int, string>

Return the possible translations.

get_term_translations()

Gather useful data to edit a term annotation on a specific text.

get_term_translations(string $wordlc, int $textid) : array<string|int, array<string|int, mixed>|int|null|string>
Parameters
$wordlc : string

Term in lower case

$textid : int

Text ID

Tags
psalm-return

array{term_lc?: string, wid?: int|null, trans?: string, ann_index?: int<0, max>, term_ord?: int, translations?: array, lang_id?: int, error?: 'Annotation line is ill-formatted'|'Annotation not found'}

Return values
array<string|int, array<string|int, mixed>|int|null|string>

Return the useful data to edit a term annotation on a specific text.

edit_term_interaction()

Prepare the HTML content for the interaction with a term

edit_term_interaction(string $wordlc, int $textid) : string
Parameters
$wordlc : string

Term in lower case

$textid : int

Text ID

Tags
deprecated
2.9.0

Use AJAX instead

Return values
string

JS string of the different fields of the term

edit_term_form()

Full form for terms edition in a given text.

edit_term_form(int $textid) : string
Parameters
$textid : int

Text ID.

Return values
string

HTML table for all terms

make_form()

Prepare the form for printed text.

make_form(int $textid, string $wordlc) : array<string|int, string>
Parameters
$textid : int

Text ID

$wordlc : string

Lowercase word

Tags
global

string $tbpref Database table prefix.

psalm-return

list{string, string}

deprecated
2.9.0

Use AJAX instead

Return values
array<string|int, string>

HTML output and JS output

do_ajax_edit_impr_text()

Do the AJAX modification for editing a printed text.

do_ajax_edit_impr_text(int $textid, string $wordlc) : void
Parameters
$textid : int

Text ID

$wordlc : string

Word lowercase. Can be left empty.


        
On this page

Search results