Lizmap Web Client Master

QgisFormControl
in package

Table of Contents

Constants

castDataType  = array('float' => 'decimal', 'real' => 'decimal', 'double' => 'decimal', 'double decimal' => 'decimal', 'numeric' => 'decimal', 'int' => 'integer', 'integer' => 'integer', 'int4' => 'integer', 'int8' => 'integer', 'bigint' => 'integer', 'smallint' => 'integer', '_int' => 'integer[]', 'text' => 'text', 'string' => 'text', 'varchar' => 'text', 'bpchar' => 'text', 'char' => 'text', '_text' => 'text[]', 'blob' => 'blob', 'bytea' => 'blob', 'geometry' => 'geometry', 'geometrycollection' => 'geometry', 'point' => 'geometry', 'multipoint' => 'geometry', 'line' => 'geometry', 'linestring' => 'geometry', 'multilinestring' => 'geometry', 'polygon' => 'geometry', 'multipolygon' => 'geometry', 'bool' => 'boolean', 'boolean' => 'boolean', 'date' => 'date', 'datetime' => 'datetime', 'timestamp' => 'datetime', 'timestamptz' => 'datetime', 'time' => 'time', 'uuid' => 'text')
QGIS_NULL_VALUE  = '{2839923C-8B7D-419E-B84B-CA2FE9B80EC7}'

Properties

$ctrl  : jFormsControl|jFormsControlDatasource
$DefaultRoot  : mixed
$defaultValue  : mixed
$fieldAlias  : mixed
Qgis field alias.
$fieldDataType  : mixed
$fieldEditType  : mixed
$fieldName  : mixed
$isReadOnly  : mixed
$isWebDAV  : mixed
$ref  : mixed
$relationReferenceData  : mixed
$rendererCategories  : mixed
Qgis rendererCategories.
$required  : mixed
$rootPathExpression  : mixed
$uniqueValuesData  : mixed
$valueRelationData  : mixed
$webDavStorageUrl  : mixed
$appContext  : AppContextInterface
$properties  : QgisFormControlProperties
$qgisEdittypeMap  : mixed

Methods

__construct()  : mixed
Create an jForms control object based on a qgis edit widget.
getControlName()  : mixed
getEditAttribute()  : mixed
getEditTypeMap()  : mixed
getFieldAlias()  : string
getRendererCategories()  : array<string|int, mixed>
getStoragePath()  : array<string|int, string>
gets the path where to store the file.
isImageUploadControl()  : mixed
isRelationReference()  : mixed
isUniqueValue()  : mixed
isUploadControl()  : mixed
isValueRelation()  : mixed
buildEditTypeMap()  : mixed
fillCheckboxValues()  : mixed
fillControlDatasource()  : mixed
getUploadControl()  : mixed
reworkBooleanControl()  : mixed
setControlMainProperties()  : mixed
setProperties()  : mixed

Constants

castDataType

public mixed castDataType = array('float' => 'decimal', 'real' => 'decimal', 'double' => 'decimal', 'double decimal' => 'decimal', 'numeric' => 'decimal', 'int' => 'integer', 'integer' => 'integer', 'int4' => 'integer', 'int8' => 'integer', 'bigint' => 'integer', 'smallint' => 'integer', '_int' => 'integer[]', 'text' => 'text', 'string' => 'text', 'varchar' => 'text', 'bpchar' => 'text', 'char' => 'text', '_text' => 'text[]', 'blob' => 'blob', 'bytea' => 'blob', 'geometry' => 'geometry', 'geometrycollection' => 'geometry', 'point' => 'geometry', 'multipoint' => 'geometry', 'line' => 'geometry', 'linestring' => 'geometry', 'multilinestring' => 'geometry', 'polygon' => 'geometry', 'multipolygon' => 'geometry', 'bool' => 'boolean', 'boolean' => 'boolean', 'date' => 'date', 'datetime' => 'datetime', 'timestamp' => 'datetime', 'timestamptz' => 'datetime', 'time' => 'time', 'uuid' => 'text')

QGIS_NULL_VALUE

public mixed QGIS_NULL_VALUE = '{2839923C-8B7D-419E-B84B-CA2FE9B80EC7}'

Properties

$fieldAlias

Qgis field alias.

use getFieldAlias()

public mixed $fieldAlias = ''

$rendererCategories

Qgis rendererCategories.

use getRendererCategories

public mixed $rendererCategories = ''

$qgisEdittypeMap

protected static mixed $qgisEdittypeMap = array(0 => array('qgis' => array('name' => 'Line edit', 'description' => 'Simple edit box'), 'jform' => array('markup' => 'input')), 4 => array('qgis' => array('name' => 'Classification', 'description' => 'Display combobox containing values of attribute used for classification'), 'jform' => array('markup' => 'menulist')), 5 => array('qgis' => array('name' => 'Range', 'description' => 'Allow one to set numeric values from a specified range. the edit widget can be either a slider or a spin box'), 'jform' => array('markup' => array('input', 'menulist'))), 2 => array('qgis' => array('name' => 'Unique values', 'description' => 'the user can select one of the values already used in the attribute. If editable, a line edit is shown with autocompletion support, otherwise a combo box is used'), 'jform' => array('markup' => 'menulist')), 8 => array('qgis' => array('name' => 'File name', 'description' => 'Simplifies file selection by adding a file chooser dialog.'), 'jform' => array('markup' => 'upload')), 3 => array('qgis' => array('name' => 'Value map', 'description' => 'Combo box with predefined items. Value is stored in the attribute, description is shown in the combobox'), 'jform' => array('markup' => 'menulist')), -1 => array('qgis' => array('name' => 'Enumeration', 'description' => 'Combo box with values that can be used within the column s type. Must be supported by the provider.'), 'jform' => array('markup' => 'input')), 10 => array('qgis' => array('name' => 'Immutable', 'description' => 'An immutable attribute is read-only- the user is not able to modify the contents.'), 'jform' => array('markup' => 'input', 'readonly' => true)), 11 => array('qgis' => array('name' => 'Hidden', 'description' => 'A hidden attribute will be invisible- the user is not able to see its contents'), 'jform' => array('markup' => 'hidden')), 7 => array('qgis' => array('name' => 'Checkbox', 'description' => 'A checkbox with a value for checked state and a value for unchecked state'), 'jform' => array('markup' => 'checkbox')), 12 => array('qgis' => array('name' => 'Text edit', 'description' => 'A text edit field that accepts multiple lines will be used'), 'jform' => array('markup' => array('textarea', 'htmleditor'))), 13 => array('qgis' => array('name' => 'Calendar', 'description' => 'A calendar widget to enter a date'), 'jform' => array('markup' => 'date')), 15 => array('qgis' => array('name' => 'Value relation', 'description' => 'Select layer, key column and value column'), 'jform' => array('markup' => array('menulist', 'checkboxes'))), 16 => array('qgis' => array('name' => 'UUID generator', 'description' => 'Read-only field that generates a UUID if empty'), 'jform' => array('markup' => 'input', 'readonly' => true)), 17 => array('qgis' => array('name' => 'External Resource', 'description' => 'Simplifies file selection by adding a file chooser dialog.'), 'jform' => array('markup' => 'upload')), 18 => array('qgis' => array('name' => 'Relation reference', 'description' => 'Use relation to select value'), 'jform' => array('markup' => 'menulist')), 'builded' => false)

Methods

__construct()

Create an jForms control object based on a qgis edit widget.

public __construct(string $ref, null|QgisFormControlProperties $properties, jDbFieldProperties $prop, null|string $defaultValue, null|array<string|int, mixed> $constraints, AppContextInterface $appContext) : mixed

And add it to the passed form.

Parameters
$ref : string

name of the control

$properties : null|QgisFormControlProperties
$prop : jDbFieldProperties

Jelix object with field properties (datatype, required, etc.)

$defaultValue : null|string

the QGIS expression of the default value

$constraints : null|array<string|int, mixed>

the QGIS constraints

$appContext : AppContextInterface

getEditAttribute()

public getEditAttribute(mixed $name) : mixed
Parameters
$name : mixed

getFieldAlias()

public getFieldAlias() : string
Return values
string

getRendererCategories()

public getRendererCategories() : array<string|int, mixed>
Return values
array<string|int, mixed>

getStoragePath()

gets the path where to store the file.

public getStoragePath(qgisVectorLayer $layer[, string $alternatePath = '' ]) : array<string|int, string>
Parameters
$layer : qgisVectorLayer

the layer which have the column corresponding to the control

$alternatePath : string = ''

an alternate path to store the file, depending on the field

Return values
array<string|int, string>

the relative path to the project path, and the full path

reworkBooleanControl()

protected reworkBooleanControl(mixed $markup) : mixed
Parameters
$markup : mixed

setControlMainProperties()

protected setControlMainProperties() : mixed

        
On this page

Search results