Lizmap Web Client Master

QgisProject
in package

Tags
phpstan-type

MapLayerDef array{ type: string, id: string, name: string, shortname: string, title: string, abstract: string, proj4: string, srid: int, authid: int, datasource: string, provider: string, keywords: array, qgsmtime?: int, file?: string, embedded?: int, projectPath?: string }

phpstan-type

VectorLayerDef array{ type: string, id: string, name: string, shortname: string, title: string, abstract: string, proj4: string, srid: int, authid: int, datasource: string, provider: string, keywords: array, fields: array, aliases: array, defaults: array, constraints: array, wfsFields: array, webDavFields: array, webDavBaseUris: array, qgsmtime?: int, file?: string, embedded?: int, projectPath?: string }

Table of Contents

Constants

MAP_ONLY_VALUES  = 2
MAP_VALUES_AS_KEYS  = 1
MAP_VALUES_AS_VALUES  = 0

Properties

$allProj4  : array<string|int, mixed>
$appContext  : AppContextInterface
$cachedProperties  : array<string|int, mixed>
$canvasColor  : string
$customProjectVariables  : array<string|int, mixed>
$data  : array<string|int, mixed>
$lastSaveDateTime  : string
Last saved date time in the QGIS file.
$layers  : array<string|int, array<string|int, mixed>>
$optionTypes  : mixed
$path  : string
$qgisEmbeddedProjects  : array<string|int, mixed>
$qgisProjectVersion  : int
Version of QGIS which wrote the project.
$relations  : array<string|int, mixed>
$relationsFields  : array<string|int, mixed>
$services  : lizmapServices
$themes  : array<string|int, mixed>
$useLayerIDs  : bool
$WMSInformation  : array<string|int, mixed>
$xml  : SimpleXMLElement

Methods

__construct()  : mixed
constructor.
findLayersByKeyword()  : array<string|int, qgisMapLayer>|array<string|int, qgisVectorLayer>
getAbstract()  : string
Get the project abstract.
getAllProj4()  : mixed
getCacheData()  : mixed
getCanvasColor()  : mixed
getCustomProjectVariables()  : mixed
getData()  : null|mixed
getEmbeddedQgisProject()  : null|QgisProject
getKeywordList()  : array<string|int, mixed>
List of keywords.
getLastSaveDateTime()  : string
Last saved date time in the QGIS file.
getLayer()  : null|qgisMapLayer|qgisVectorLayer
getLayerByKeyword()  : null|qgisMapLayer|qgisVectorLayer
getLayerDefinition()  : null|MapLayerDef|VectorLayerDef
getLayerNameByIdFromConfig()  : null|string
getPrintTemplates()  : array<string|int, mixed>
getProj4()  : mixed
getQgisProjectVersion()  : mixed
getRelationField()  : mixed
getRelations()  : mixed
getThemes()  : mixed
getTitle()  : string
Get the project title.
getWMSInformation()  : mixed
getWMSMaxHeight()  : int
WMS Max Height.
getWMSMaxWidth()  : int
WMS Max Width.
getXmlLayer()  : array<string|int, SimpleXMLElement>
isUsingLayerIDs()  : bool
readAttributeLayers()  : mixed
readEditionForms()  : mixed
readEditionLayers()  : mixed
readFormControls()  : array<string|int, mixed>
readLayersLabeledFieldsConfig()  : mixed
Read the layer QGIS form configuration for the layers used in attribute tables, form filter & dataviz, and get the configuration for the fields for which to display labels instead of codes.
readLayersOrder()  : array<string|int, int>
readLocateByLayer()  : mixed
setPropertiesAfterRead()  : mixed
xpathQuery()  : array<string|int, mixed>
Execute an xpath Query on the XML content and return the result.
convertTypeOptions()  : mixed
convertValueOptions()  : bool|float|int|string
getEditType()  : array<string|int, QgisFormControlProperties>
getFieldConfiguration()  : array<string|int, QgisFormControlProperties>
getFieldConfigurationOptions()  : mixed
getMarkup()  : string
getValuesFromOptions()  : array<string|int, mixed>
getXml()  : SimpleXMLElement
temporary function to read xml for some methods that relies on xml data that are not yet stored in the cache.
getXmlLayer2()  : null|SimpleXMLElement
readAllProj4()  : array<string|int, mixed>
readCanvasColor()  : string
readCustomProjectVariables()  : null|array<string, string>
readLastSaveDateTime()  : string
Read the last modified date of the QGS file.
readLayers()  : array<string|int, MapLayerDef|VectorLayerDef>
readQgisProjectVersion()  : mixed
readRelationField()  : mixed
readRelations()  : null|array<string|int, array<string|int, mixed>>
readThemes()  : null|array<string|int, array<string|int, mixed>>
readUploadOptions()  : mixed
readUseLayerIDs()  : bool
readWebDavStorageOptions()  : mixed
update the upload options with the property 'webDAVStorageUrl'.
readWMSInformation()  : mixed
readXmlProject()  : mixed
Read the qgis files.
setLayerGroupData()  : mixed
Set layers' group infos.
setLayerOpacity()  : mixed
Set layers' opacity with XML data.
setLayerShowFeatureCount()  : mixed
Set layers' last infos.
setShortNames()  : mixed
Set layers' shortname with XML data.
unsetPropAfterRead()  : mixed
Set/Unset some properties after reading the config file.

Constants

MAP_VALUES_AS_KEYS

public mixed MAP_VALUES_AS_KEYS = 1

MAP_VALUES_AS_VALUES

public mixed MAP_VALUES_AS_VALUES = 0

Properties

$allProj4

protected array<string|int, mixed> $allProj4 = array()

authid => proj4

$cachedProperties

protected static array<string|int, mixed> $cachedProperties = array('WMSInformation', 'canvasColor', 'allProj4', 'relations', 'relationsFields', 'themes', 'useLayerIDs', 'layers', 'data', 'qgisProjectVersion', 'lastSaveDateTime', 'customProjectVariables')

List of cached properties

$customProjectVariables

protected array<string|int, mixed> $customProjectVariables = array()

list of custom project variables defined by user in project

$data

protected array<string|int, mixed> $data = array()

QGIS project data

$lastSaveDateTime

Last saved date time in the QGIS file.

protected string $lastSaveDateTime

the last saved date contained in the QGS file

$layers

protected array<string|int, array<string|int, mixed>> $layers = array()

list of layers. Each item is a list of layer properties

$optionTypes

protected static mixed $optionTypes = array('Min' => 'f', 'Max' => 'f', 'Step' => 'i', 'Precision' => 'i', 'AllowMulti' => 'b', 'AllowNull' => 'b', 'UseCompleter' => 'b', 'DocumentViewer' => 'b', 'fieldEditable' => 'b', 'editable' => 'b', 'Editable' => 'b', 'notNull' => 'b', 'MapIdentification' => 'b', 'IsMultiline' => 'b', 'UseHtml' => 'b', 'field_iso_format' => 'b')

$qgisEmbeddedProjects

protected array<string|int, mixed> $qgisEmbeddedProjects = array()

List of embedded projects

$qgisProjectVersion

Version of QGIS which wrote the project.

protected int $qgisProjectVersion

$relations

protected array<string|int, mixed> $relations = array()

for each referenced layer, there is an item with referencingLayer, referencedField, referencingField keys. There is also a 'pivot' key

$relationsFields

protected array<string|int, mixed> $relationsFields = array()

list of fields properties for each relation

$themes

protected array<string|int, mixed> $themes = array()

list of themes

$WMSInformation

protected array<string|int, mixed> $WMSInformation

contains WMS info

$xml

protected SimpleXMLElement $xml

QGIS project XML

Methods

getAbstract()

Get the project abstract.

public getAbstract() : string
Return values
string

the project abstract

getCustomProjectVariables()

public getCustomProjectVariables() : mixed

getData()

public getData(string $key) : null|mixed
Parameters
$key : string
Return values
null|mixed

getKeywordList()

List of keywords.

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

getLastSaveDateTime()

Last saved date time in the QGIS file.

public getLastSaveDateTime() : string
Return values
string

the last saved date contained in the QGS file

getLayerDefinition()

public getLayerDefinition(string $layerId) : null|MapLayerDef|VectorLayerDef
Parameters
$layerId : string
Return values
null|MapLayerDef|VectorLayerDef

getLayerNameByIdFromConfig()

public getLayerNameByIdFromConfig(string $layerId, object $layers) : null|string
Parameters
$layerId : string
$layers : object
Return values
null|string

getPrintTemplates()

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

getProj4()

public getProj4(mixed $authId) : mixed
Parameters
$authId : mixed

getQgisProjectVersion()

public getQgisProjectVersion() : mixed

getRelationField()

public getRelationField(mixed $relationId) : mixed
Parameters
$relationId : mixed

getTitle()

Get the project title.

public getTitle() : string
Return values
string

the project title

getWMSInformation()

public getWMSInformation() : mixed

getWMSMaxHeight()

WMS Max Height.

public getWMSMaxHeight() : int
Return values
int

getWMSMaxWidth()

WMS Max Width.

public getWMSMaxWidth() : int
Return values
int

getXmlLayer()

public getXmlLayer(mixed $layerId) : array<string|int, SimpleXMLElement>
Parameters
$layerId : mixed
Tags
FIXME:

remove this method. Be sure it is not used in other projects. Data provided by the returned xml element should be extracted and encapsulated into an object. Xml should not be used by callers

Return values
array<string|int, SimpleXMLElement>

isUsingLayerIDs()

public isUsingLayerIDs() : bool
Return values
bool

readAttributeLayers()

public readAttributeLayers(object $attributeLayers) : mixed
Parameters
$attributeLayers : object

readEditionForms()

public readEditionForms(object $editionLayers, Project $proj) : mixed
Parameters
$editionLayers : object
$proj : Project

readEditionLayers()

public readEditionLayers(object $editionLayers) : mixed
Parameters
$editionLayers : object

readFormControls()

public readFormControls(SimpleXMLElement $layerXml, string $layerId, Project $proj) : array<string|int, mixed>
Parameters
$layerXml : SimpleXMLElement
$layerId : string
$proj : Project
Return values
array<string|int, mixed>

readLayersLabeledFieldsConfig()

Read the layer QGIS form configuration for the layers used in attribute tables, form filter & dataviz, and get the configuration for the fields for which to display labels instead of codes.

public readLayersLabeledFieldsConfig(array<string|int, mixed> $layerIds, Project $proj) : mixed

This concerns fields with ValueMap, ValueRelation & RelationReference config

Parameters
$layerIds : array<string|int, mixed>

List of layer identifiers

$proj : Project

readLayersOrder()

public readLayersOrder(SimpleXMLElement $xml, mixed $layers) : array<string|int, int>
Parameters
$xml : SimpleXMLElement
$layers : mixed
Return values
array<string|int, int>

readLocateByLayer()

public readLocateByLayer(object $locateByLayer) : mixed
Parameters
$locateByLayer : object

xpathQuery()

Execute an xpath Query on the XML content and return the result.

public xpathQuery(string $query) : array<string|int, mixed>
Parameters
$query : string

The query to execute

Return values
array<string|int, mixed>

convertTypeOptions()

protected convertTypeOptions(mixed &$options) : mixed
Parameters
$options : mixed

convertValueOptions()

protected convertValueOptions(string $value, string $type) : bool|float|int|string
Parameters
$value : string

the option value attribute content

$type : string

the option type attribute content

Return values
bool|float|int|string

getFieldConfigurationOptions()

protected getFieldConfigurationOptions(SimpleXMLElement $options) : mixed
Parameters
$options : SimpleXMLElement

getMarkup()

protected getMarkup(int|string $fieldEditType, array<string|int, mixed> $editAttributes) : string
Parameters
$fieldEditType : int|string
$editAttributes : array<string|int, mixed>

attributes of widgetv2config

Return values
string

getValuesFromOptions()

protected getValuesFromOptions(SimpleXMLElement $optionList[, int $valuesExtraction = 0 ]) : array<string|int, mixed>
Parameters
$optionList : SimpleXMLElement
$valuesExtraction : int = 0

one of MAP_* const

Return values
array<string|int, mixed>

getXml()

temporary function to read xml for some methods that relies on xml data that are not yet stored in the cache.

protected getXml() : SimpleXMLElement
Return values
SimpleXMLElement

getXmlLayer2()

protected getXmlLayer2(SimpleXMLElement $xml, string $layerId) : null|SimpleXMLElement
Parameters
$xml : SimpleXMLElement
$layerId : string
Return values
null|SimpleXMLElement

readAllProj4()

protected readAllProj4(SimpleXMLElement $xml) : array<string|int, mixed>
Parameters
$xml : SimpleXMLElement
Return values
array<string|int, mixed>

readCanvasColor()

protected readCanvasColor(SimpleXMLElement $xml) : string
Parameters
$xml : SimpleXMLElement
Return values
string

readCustomProjectVariables()

protected readCustomProjectVariables(SimpleXMLElement $xml) : null|array<string, string>
Parameters
$xml : SimpleXMLElement
Return values
null|array<string, string>

array of custom variable name => variable value

readLastSaveDateTime()

Read the last modified date of the QGS file.

protected readLastSaveDateTime(string $qgs_path) : string
Parameters
$qgs_path : string

the path to the QGS file

Return values
string

the last saved date contained in the QGS file

readLayers()

protected readLayers(SimpleXMLElement $xml) : array<string|int, MapLayerDef|VectorLayerDef>
Parameters
$xml : SimpleXMLElement
Tags
throws
Exception
Return values
array<string|int, MapLayerDef|VectorLayerDef>

list of layers. Each item is a list of layer properties

readQgisProjectVersion()

protected readQgisProjectVersion(SimpleXMLElement $xml) : mixed
Parameters
$xml : SimpleXMLElement

readRelationField()

protected readRelationField(SimpleXMLElement $relationXml) : mixed
Parameters
$relationXml : SimpleXMLElement

readRelations()

protected readRelations(SimpleXMLElement $xml) : null|array<string|int, array<string|int, mixed>>
Parameters
$xml : SimpleXMLElement
Return values
null|array<string|int, array<string|int, mixed>>

list of two list: reference between relation, and fields of relations

readThemes()

protected readThemes(SimpleXMLElement $xml) : null|array<string|int, array<string|int, mixed>>
Parameters
$xml : SimpleXMLElement
Return values
null|array<string|int, array<string|int, mixed>>

readUploadOptions()

protected readUploadOptions(mixed $fieldEditType, mixed &$fieldEditOptions) : mixed
Parameters
$fieldEditType : mixed
$fieldEditOptions : mixed

readUseLayerIDs()

protected readUseLayerIDs(SimpleXMLElement $xml) : bool
Parameters
$xml : SimpleXMLElement
Return values
bool

readWebDavStorageOptions()

update the upload options with the property 'webDAVStorageUrl'.

protected readWebDavStorageOptions(array<string|int, mixed> &$fieldEditOptions) : mixed
Parameters
$fieldEditOptions : array<string|int, mixed>

readWMSInformation()

protected readWMSInformation(mixed $qgsLoad) : mixed
Parameters
$qgsLoad : mixed

readXmlProject()

Read the qgis files.

protected readXmlProject(mixed $qgs_path) : mixed
Parameters
$qgs_path : mixed

        
On this page

Search results