Lizmap Web Client 3.11.0

lizmapFts
in package

Table of Contents

Methods

getData()  : array<int, mixed>
Method called by the autocomplete input field for place search.
generateSql()  : string
Generate the SQL for lizmap_search according to the given project.
getUserFilterParameters()  : array<string, string>
Get the parameters used to filter the lizmap_search items by user.

Methods

getData()

Method called by the autocomplete input field for place search.

public static getData(Project $project, string $searchedString, bool $debug[, int $limit = 500 ]) : array<int, mixed>
Parameters
$project : Project
$searchedString : string

Searched string

$debug : bool

If the debug mode is ON

$limit : int = 500

default 40

Return values
array<int, mixed> —

of matching places

generateSql()

Generate the SQL for lizmap_search according to the given project.

protected static generateSql(Project $project, int $termsCount[, array<string, string> $userFilterParams = array() ]) : string

The values are not put in the SQL: it contains named parameters, given when executing the query.

Parameters
$project : Project

The QGIS project

$termsCount : int

How many terms are in the searched string

$userFilterParams : array<string, string> = array()

The parameters returned by getUserFilterParameters()

Return values
string —

The SQL query

getUserFilterParameters()

Get the parameters used to filter the lizmap_search items by user.

protected static getUserFilterParameters(Project $project) : array<string, string>

The items can be restricted to some groups or users with the item_filter column. The groups of the authenticated user are given as parameters grp0, grp1..., and its login as the parameter login.

Parameters
$project : Project

The QGIS project

Return values
array<string, string> —

the parameters, empty if the user is not authenticated

On this page

Search results