ProjectConfig
in package
It allows to access to configuration properties stored into the cfg file of a project, and to access to some "calculated" properties.
Table of Contents
Properties
- $atlas : object
- $attributeLayers : object
- $cachedProperties : mixed
- $datavizLayers : object
- $editionLayers : object
- $filter_by_polygon : object
- $formFilterLayers : object
- $layers : object
- $layouts : object
- $locateByLayer : object
- $loginFilteredLayers : object
- $metadata : object
- $options : mixed
- $timemanagerLayers : object
- $tooltipLayers : object
- $warnings : mixed
Methods
- __construct() : mixed
- findLayerByAnyName() : mixed
- Call every findLayerBy function to get a layer.
- findLayerByLayerId() : mixed
- Return the layer corresponding to layerId.
- findLayerByName() : mixed
- Return the layer corresponding to name.
- findLayerByShortName() : mixed
- Return the layer corresponding to shortname.
- findLayerByTitle() : mixed
- Return the layer corresponding to title.
- findLayerByTypeName() : mixed
- Return the layer corresponding to typeName.
- getAtlas() : null|object
- getAttributeLayers() : null|object
- getBooleanOption() : null|bool
- Retrieve the given option as a boolean value.
- getCacheData() : object
- Return the properties to store in the cache.
- getConfigContent() : object
- Return the config content.
- getData() : mixed
- getDatavizLayers() : null|object
- getEditionLayerByLayerId() : null|object
- getEditionLayerByName() : mixed
- getEditionLayers() : object
- getFormFilterLayers() : mixed
- getLayer() : mixed
- getLayers() : object
- getLayouts() : null|object
- Print layouts since Lizmap 3.7.
- getLocateByLayer() : null|object
- getLoginFilteredLayers() : null|object
- getOption() : null|mixed
- getOptions() : mixed
- getPluginMetadata() : null|object
- Get the metadata written by Lizmap plugin about the desktop version used.
- getPolygonFilterConfig() : object
- Contains the configuration and layers of the polygon by layer feature.
- getProjectCfgWarnings() : null|object
- Get warnings from the CFG files If the CFG file has been made with at least with 4.0.0 version.
- getTimemanagerLayers() : mixed
- getTooltipLayers() : null|object
- hasEditionLayers() : bool
- removeLayer() : mixed
- setDatavizTemplateFromDragAndDropLayout() : mixed
- Get the HTML template built from the Drag and drop layout and override the original datavizTemplate configuration option.
- setLayer() : mixed
- parseDatavizTreeNode() : string
- Parse a dataviz drag & drop layout node and build the corresponding HTML.
- setOption() : mixed
Properties
$atlas
protected
object
$atlas
$attributeLayers
protected
object
$attributeLayers
$cachedProperties
protected
static mixed
$cachedProperties
= array('locateByLayer', 'formFilterLayers', 'editionLayers', 'attributeLayers', 'layers', 'options', 'timemanagerLayers', 'atlas', 'tooltipLayers', 'layouts', 'loginFilteredLayers', 'filter_by_polygon', 'datavizLayers', 'metadata', 'warnings')
$datavizLayers
protected
object
$datavizLayers
$editionLayers
protected
object
$editionLayers
$filter_by_polygon
protected
object
$filter_by_polygon
$formFilterLayers
protected
object
$formFilterLayers
$layers
protected
object
$layers
$layouts
protected
object
$layouts
$locateByLayer
protected
object
$locateByLayer
$loginFilteredLayers
protected
object
$loginFilteredLayers
$metadata
protected
object
$metadata
$options
protected
mixed
$options
$timemanagerLayers
protected
object
$timemanagerLayers
$tooltipLayers
protected
object
$tooltipLayers
$warnings
protected
mixed
$warnings
Methods
__construct()
public
__construct(object $data) : mixed
Parameters
- $data : object
-
properties of the QGIS project, coming from the cfg file
findLayerByAnyName()
Call every findLayerBy function to get a layer.
public
findLayerByAnyName(string $name) : mixed
Parameters
- $name : string
-
The name, shortname, typename, id or title of the layer to get
Tags
findLayerByLayerId()
Return the layer corresponding to layerId.
public
findLayerByLayerId(string $layerId) : mixed
Parameters
- $layerId : string
-
The id of the layer
findLayerByName()
Return the layer corresponding to name.
public
findLayerByName(string $name) : mixed
Parameters
- $name : string
-
The name of the layer
findLayerByShortName()
Return the layer corresponding to shortname.
public
findLayerByShortName(string $shortName) : mixed
Parameters
- $shortName : string
-
The shortname of the layer
findLayerByTitle()
Return the layer corresponding to title.
public
findLayerByTitle(string $title) : mixed
Parameters
- $title : string
-
The title of the layer
findLayerByTypeName()
Return the layer corresponding to typeName.
public
findLayerByTypeName(string $typeName) : mixed
Parameters
- $typeName : string
-
The type name of the layer
getAtlas()
public
getAtlas() : null|object
Return values
null|objectgetAttributeLayers()
public
getAttributeLayers() : null|object
Return values
null|objectgetBooleanOption()
Retrieve the given option as a boolean value.
public
getBooleanOption(string $name) : null|bool
Parameters
- $name : string
-
option name
Return values
null|bool —true if the option value is 'True', null if it does not exist
getCacheData()
Return the properties to store in the cache.
public
getCacheData() : object
Return values
objectgetConfigContent()
Return the config content.
public
getConfigContent() : object
Return values
objectgetData()
public
getData() : mixed
Tags
getDatavizLayers()
public
getDatavizLayers() : null|object
Return values
null|objectgetEditionLayerByLayerId()
public
getEditionLayerByLayerId(mixed $layerId) : null|object
Parameters
- $layerId : mixed
Return values
null|objectgetEditionLayerByName()
public
getEditionLayerByName(mixed $name) : mixed
Parameters
- $name : mixed
getEditionLayers()
public
getEditionLayers() : object
Return values
object —{layer names : layers}
getFormFilterLayers()
public
getFormFilterLayers() : mixed
getLayer()
public
getLayer(mixed $layerName) : mixed
Parameters
- $layerName : mixed
getLayers()
public
getLayers() : object
Return values
objectgetLayouts()
Print layouts since Lizmap 3.7.
public
getLayouts() : null|object
Return values
null|objectgetLocateByLayer()
public
getLocateByLayer() : null|object
Return values
null|objectgetLoginFilteredLayers()
public
getLoginFilteredLayers() : null|object
Return values
null|objectgetOption()
public
getOption(string $name) : null|mixed
Parameters
- $name : string
Return values
null|mixedgetOptions()
public
getOptions() : mixed
getPluginMetadata()
Get the metadata written by Lizmap plugin about the desktop version used.
public
getPluginMetadata() : null|object
qgis_desktop_version, lizmap_plugin_version, lizmap_web_client_target_version.
Return values
null|objectgetPolygonFilterConfig()
Contains the configuration and layers of the polygon by layer feature.
public
getPolygonFilterConfig() : object
Return values
objectgetProjectCfgWarnings()
Get warnings from the CFG files If the CFG file has been made with at least with 4.0.0 version.
public
getProjectCfgWarnings() : null|object
Return values
null|objectgetTimemanagerLayers()
public
getTimemanagerLayers() : mixed
getTooltipLayers()
public
getTooltipLayers() : null|object
Return values
null|objecthasEditionLayers()
public
hasEditionLayers() : bool
Return values
boolremoveLayer()
public
removeLayer(mixed $layerName) : mixed
Parameters
- $layerName : mixed
setDatavizTemplateFromDragAndDropLayout()
Get the HTML template built from the Drag and drop layout and override the original datavizTemplate configuration option.
public
setDatavizTemplateFromDragAndDropLayout([mixed $debug = false ]) : mixed
Parameters
- $debug : mixed = false
Tags
setLayer()
public
setLayer(string $layerName, object $layer) : mixed
Parameters
- $layerName : string
- $layer : object
parseDatavizTreeNode()
Parse a dataviz drag & drop layout node and build the corresponding HTML.
private
parseDatavizTreeNode(object $node, int $level, mixed $debug) : string
This is a recursive function.
Parameters
- $node : object
-
Tree node
- $level : int
-
Tree node level
- $debug : mixed
Return values
string —$html Built HTML content
setOption()
private
setOption(mixed $name, mixed $value) : mixed
Parameters
- $name : mixed
- $value : mixed