CorePlugins
[ class tree: CorePlugins ] [ index: CorePlugins ] [ all elements ]

Class: ClientLayers

Source Location: /coreplugins/layers/client/ClientLayers.php

Class Overview

PluginBase
   |
   --ClientPlugin
      |
      --ClientLayers

Handles layers selection interface


Variables

Methods


Inherited Variables

Inherited Methods

Class: ClientPlugin

ClientPlugin::__construct()
Constructor
ClientPlugin::checkBool()
Checks if variable $variable has a boolean (0 or 1) value $value.
ClientPlugin::checkInt()
Checks if variable $variable has an integer positive or zero value $value.
ClientPlugin::checkNumeric()
Checks if variable $variable has a numeric value $value.
ClientPlugin::getCartoclient()
ClientPlugin::getConfig()
ClientPlugin::getHttpValue()
Returns the user-submitted $key data if it is set.
ClientPlugin::initializeConfig()
Initializes plugin configuration

Class: PluginBase

PluginBase::__construct()
Constructor
PluginBase::getBasePath()
PluginBase::getExtendedName()
PluginBase::getName()
PluginBase::getRequest()
Get plugin's request or result out of MapRequest or MapResult
PluginBase::initialize()
Plugin initialization (can be extended in custom plugins)
PluginBase::initializeConfig()
Initializes plugin
PluginBase::replacePlugin()
Returns name of parent plugin in case of plugin extension
PluginBase::setBasePath()
PluginBase::setExtendedName()
PluginBase::setName()

Class Details

[line 179]
Handles layers selection interface



[ Top ]


Class Variables

$childrenCache = array()

[line 276]



Tags:

access:  private

Type:   array


[ Top ]

$currentScale =

[line 281]



Tags:

access:  private

Type:   float


[ Top ]

$frozenLayers = array()

[line 246]



Tags:

access:  private

Type:   array


[ Top ]

$frozenSelectedLayers =

[line 221]



Tags:

access:  private

Type:   array


[ Top ]

$frozenUnselectedLayers =

[line 226]



Tags:

access:  private

Type:   array


[ Top ]

$hiddenLayers = array()

[line 241]



Tags:

access:  private

Type:   array


[ Top ]

$hiddenSelectedLayers =

[line 211]



Tags:

access:  private

Type:   array


[ Top ]

$hiddenUnselectedLayers =

[line 216]



Tags:

access:  private

Type:   array


[ Top ]

$layerIds = array()

[line 271]



Tags:

access:  private

Type:   array


[ Top ]

$layers =

[line 231]



Tags:

access:  private

Type:   array


[ Top ]

$layersData =

[line 206]

List of LayerState objects. See LayerState.



Tags:

access:  private

Type:   array


[ Top ]

$layersInit =

[line 195]



Tags:

access:  private

Type:   LayersInit


[ Top ]

$layersState =

[line 200]



Tags:

access:  private

Type:   LayersState


[ Top ]

$log =

[line 185]



Tags:

access:  private

Type:   Logger
Overrides:   Array


[ Top ]

$mapId =

[line 286]



Tags:

access:  private

Type:   string


[ Top ]

$nodeId = array()

[line 261]



Tags:

access:  private

Type:   array


[ Top ]

$nodesIds = array()

[line 266]



Tags:

access:  private

Type:   array


[ Top ]

$notAvailableIcon =

[line 291]

Availability information icons



Tags:

access:  private

Type:   mixed


[ Top ]

$notAvailableMinusIcon =

[line 293]



Tags:

access:  private

Type:   mixed


[ Top ]

$notAvailablePlusIcon =

[line 292]



Tags:

access:  private

Type:   mixed


[ Top ]

$selectedLayers = array()

[line 236]



Tags:

access:  private

Type:   array


[ Top ]

$smarty =

[line 190]



Tags:

access:  private

Type:   Smarty_CorePlugin


[ Top ]

$unfoldedIds = array()

[line 256]



Tags:

access:  private

Type:   array


[ Top ]

$unfoldedLayerGroups = array()

[line 251]



Tags:

access:  private

Type:   array


[ Top ]



Class Methods


constructor __construct [line 298]

ClientLayers __construct( )

Constructor



Tags:

access:  public


Overrides ClientPlugin::__construct() (Constructor)

[ Top ]

method adjustExportMapRequest [line 1251]

void adjustExportMapRequest( ExportConfiguration $configuration, MapRequest $mapRequest)



Tags:

access:  public
see:  Exportable::adjustExportMapRequest()


[ Top ]

method buildMapRequest [line 812]

void buildMapRequest( mixed $mapRequest)

Sets selected layers list in MapRequest.



Tags:

access:  public
see:  ServerCaller::buildMapRequest()


[ Top ]

method createSession [line 354]

void createSession( MapInfo $mapInfo, InitialMapState $initialMapState)

Initializes layers session data and initially populates some properties.



Tags:

access:  public
see:  Sessionable::CreateSession()


[ Top ]

method drawLayersList [line 1103]

string drawLayersList( )

Initializes layers selector interface.



Tags:

return:  result of a Smarty fetch
access:  private


[ Top ]

method fetchChildrenFromLayerGroup [line 743]

array fetchChildrenFromLayerGroup( array $layersList)

Determines activated layers by recursively browsing LayerGroups.

Only keeps Layer objects that are not detected as {hidden AND not selected}.




Tags:

return:  list of children, grand-children... of given layers
access:  public


Parameters:

array   $layersList   list of layers names

[ Top ]

method fetchFrozenSelectedLayers [line 677]

array fetchFrozenSelectedLayers( string $layerId, [boolean $forceFrozen = false], [boolean $forceSelected = false])

Recursively retrieves selected frozen layers.



Tags:

access:  private
see:  ClientLayers::fetchHiddenSelectedLayers()


Parameters:

string   $layerId   layer name
boolean   $forceFrozen   (default: false) if true, transmits 'frozen' status to children layers
boolean   $forceSelected   (default: false) if true, transmits 'selected' status to children layers

[ Top ]

method fetchHiddenSelectedLayers [line 657]

array fetchHiddenSelectedLayers( string $layerId, [boolean $forceHidden = false], [boolean $forceSelected = false])

Recursively retrieves selected hidden layers (not transmitted by the browser). Since "hidden" property is inheritated by layers from their declared-as-hidden parents, those layers selection statuses are retrieved as well.



Tags:

access:  private


Parameters:

string   $layerId   layer name
boolean   $forceHidden   (default: false) if true, transmits 'hidden' status to children layers
boolean   $forceSelected   (default: false) if true, transmits 'selected' status to children layers

[ Top ]

method fetchLayer [line 965]

array fetchLayer( LayerBase $layer, [boolean $forceSelection = false], [boolean $forceFrozen = false], [string $layerRendering = 'tree'], [int $parentId = 0])

Deals with every single layer and recursively calls itself to build sublayers.



Tags:

return:  array of layer children and grand-children... data
access:  private


Parameters:

LayerBase   $layer  
boolean   $forceSelection   (default: false) if true transmits 'selected' status to children
boolean   $forceFrozen   (default: false) if true transmits 'frozen' status to children
string   $layerRendering   (default: 'tree') rendering of layers
int   $parentId   (default: 0) id of parent layer in displayed interface

[ Top ]

method fetchLayerIcon [line 893]

string fetchLayerIcon( LayerBase $layer, [array &$children = array()])

Returns layer icon filename if any.



Tags:

access:  private


Parameters:

LayerBase   $layer  
array   &$children   list of layer children names (default: empty array)

[ Top ]

method fetchRecursively [line 701]

array fetchRecursively( LayerBase $layer, string $type, boolean $forceFixed, boolean $forceSelected)

Performs common recursive job for fetchHiddenSelectedLayers() and fetchFrozenSelectedLayers().



Tags:



Parameters:

LayerBase   $layer  
string   $type   type of layers detection: 'hidden' or 'frozen'
boolean   $forceFixed   inherited status (see above type)
boolean   $forceSelected   inherited selection status

[ Top ]

method getClassChildren [line 840]

array getClassChildren( LayerBase $layer)

Recursively retrieves the list of Mapserver Classes bound to the layer or its sublayers.



Tags:

return:  array of layers names
access:  private


Parameters:

LayerBase   $layer  

[ Top ]

method getCurrentScale [line 861]

float getCurrentScale( )

Retrieves current scale from location plugin



Tags:

access:  private


[ Top ]

method getFrozenLayers [line 641]

array getFrozenLayers( )

Returns the list of explicitely frozen layers.



Tags:

access:  private


[ Top ]

method getHiddenLayers [line 633]

array getHiddenLayers( )

Returns the list of explicitely hidden layers.



Tags:

access:  private


[ Top ]

method getLayerByName [line 482]

LayerBase getLayerByName( string $layername, [boolean $strict = true])

Returns the Layer|LayerGroup|LayerClass object whose name is passed.



Tags:

return:  layer object of type Layer|LayerGroup|LayerClass
access:  private


Parameters:

string   $layername   name of layer
boolean   $strict   if true (default), throws exception if invalid layername

[ Top ]

method getLayerChildren [line 498]

array getLayerChildren( LayerBase $layer)

Returns a list of current layer children, taking into account some criteria such as aggregation, LayerClass name validity.



Tags:

return:  array of layers names
access:  private


Parameters:

LayerBase   $layer   layer object of type Layer|LayerGroup|LayerClass

[ Top ]

method getLayerIds [line 458]

array getLayerIds( )



Tags:

return:  layerIds, list of server-asked layers
access:  public


[ Top ]

method getLayerNode [line 422]

LayerNode getLayerNode( )

Construct a new tree of layerNodes by getting the layers from the mapInfo.



Tags:

return:  The root node of the hierarchy of layerNodes.
access:  private


[ Top ]

method getLayers [line 467]

array getLayers( )

Returns the list of Layer|LayerGroup|LayerClass objects available in MapInfo.



Tags:

access:  private


[ Top ]

method getLayersMask [line 779]

array getLayersMask( [string $layerId = 'root'])

Recursively determines layers that can be selected in layers selector.



Tags:

return:  layers list
access:  private


Parameters:

string   $layerId   layer id

[ Top ]

method getLayersSecurityFiltered [line 442]

array getLayersSecurityFiltered( )

Filters the layers which are not allowed to be viewed by the current user. It returns a flat map of (layerId => Layer object).



Tags:

return:  An array of LayerBase object.
access:  private


[ Top ]

method getMatchingLayers [line 596]

array getMatchingLayers( string $stateProperty, string $storageName, [boolean $refresh = false])

Returns a list of layers that match passed condition.

Is in fact a code factorizer for get*Layers() methods.




Tags:

access:  private


Parameters:

string   $stateProperty   name of some LayerBase property. See LayerBase.
string   $storageName   name of ClientLayers property that contains data
boolean   $refresh   if true, refreshes storage content (default to false)

[ Top ]

method getNewSessionObject [line 346]

LayersState getNewSessionObject( )

Gets a new instance of layers-plugin session-storage class.

Usefull in extended ClientLayers class when using extended session storage class.




Tags:

access:  private


[ Top ]

method getPrintedIconPath [line 1138]

string getPrintedIconPath( string $icon)

Returns icon full path.



Tags:

return:  full path
access:  private


Parameters:

string   $icon   icon filename

[ Top ]

method getPrintedLayerData [line 1151]

array getPrintedLayerData( string $layerId)

Returns given layer printing data (icon, label, children...).



Tags:

access:  private


Parameters:

string   $layerId   layer id

[ Top ]

method getPrintedLayers [line 1218]

array getPrintedLayers( array $selectedLayers, float $scale)

Returns the list of layers actually printed on mainmap as well as their classes and parent LayerGroups if any (mainly used for PDF printing).



Tags:

return:  complete list of printed layers, layergroups, layerclasses
access:  public


Parameters:

array   $selectedLayers   list of layers explicitely asked to CartoServer
float   $scale   scale value

[ Top ]

method getPrintedParents [line 1179]

void getPrintedParents( string $layerId, array &$selectedLayers, array &$printedNodes)

Recursively detects selected layers parent nodes and substitutes them if parents are aggregated.



Tags:

access:  private


Parameters:

string   $layerId   current layer id
array   &$selectedLayers   selected layers list
array   &$printedNodes   structure containing data of layers to print

[ Top ]

method getSelectedLayers [line 616]

array getSelectedLayers( [boolean $refresh = false])

Returns the list of activated layers.



Tags:

access:  private


Parameters:

boolean   $refresh   optional (default: false), if true, forces result refresh

[ Top ]

method getUnfoldedLayerGroups [line 625]

array getUnfoldedLayerGroups( )

Returns the list of LayerGroups that must be rendered unfolded.



Tags:

access:  private


[ Top ]

method handleHttpGetRequest [line 586]

void handleHttpGetRequest( mixed $request)

Handles data from GET request. Not used/implemented yet.



Tags:

access:  public
see:  GuiProvider::handleHttpGetRequest()


[ Top ]

method handleHttpPostRequest [line 534]

void handleHttpPostRequest( mixed $request)

Handles layers-related POST'ed data and updates layers statuses.



Tags:

access:  public
see:  GuiProvider::handleHttpPostRequest()


[ Top ]

method handleInit [line 306]

void handleInit( mixed $layersInit)



Tags:

access:  public
see:  InitUser::handleInit()


[ Top ]

method handleResult [line 832]

void handleResult( mixed $mapResult)



Tags:

access:  public
see:  ServerCaller::handleResult()


[ Top ]

method initializeResult [line 827]

void initializeResult( mixed $mapResult)



Tags:

access:  public
see:  ServerCaller::initializeResult()


[ Top ]

method isOutOfRangeIcon [line 881]

boolean isOutOfRangeIcon( string $icon)



Tags:

return:  True if this icon is an out of range icon (below or above scale).
access:  private


Parameters:

string   $icon   icon filename

[ Top ]

method loadSession [line 318]

void loadSession( mixed $sessionObject)

Retrieves session-saved layers data.



Tags:

access:  public
see:  Sessionable::loadSession()


[ Top ]

method nodesFilterSecurity [line 406]

boolean nodesFilterSecurity( LayerNode $node)

Callback used to remove nodes which are not visible by the current user.

If it returns true, the node will be ignored in the tree.




Tags:

return:  True of this node is not accepted (meaning access denied)
access:  public


Parameters:

LayerNode   $node   The node on which to check access

[ Top ]

method renderForm [line 1129]

void renderForm( Smarty $template)

Assigns the layers interface output in the general CartoClient template.



Tags:

access:  public
see:  GuiProvider::renderForm()


[ Top ]

method saveSession [line 1241]

void saveSession( )

Saves layers data in session.



Tags:

access:  public
see:  Sessionable::saveSession()


[ Top ]

method setOutofScaleIcon [line 935]

boolean setOutofScaleIcon( LayerBase $layer)

Substitutes out-of-scale icons if current scale is out of the layer range of scales.



Tags:

access:  private


Parameters:

LayerBase   $layer  

[ Top ]


Documentation generated on Wed, 6 Apr 2005 12:06:31 +0200 by phpDocumentor 1.3.0RC3