Mapbender 3.0.6.1 API documenation
  • Namespace
  • Class
  • Tree
  • Deprecated
  • Todo
  • Download

Namespaces

  • FOM
    • CoreBundle
      • Component
      • DependencyInjection
      • Doctrine
        • Types
      • Form
        • DataTransformer
        • Type
    • ManagerBundle
      • Component
      • Configuration
      • Controller
      • DependencyInjection
        • Compiler
      • Form
        • Type
      • Routing
    • UserBundle
      • Command
      • Component
      • Controller
      • DependencyInjection
        • Factory
      • Entity
      • EventListener
      • Form
        • DataTransformer
        • EventListener
        • Type
      • Security
        • Authentication
          • Provider
          • Token
        • Authorization
          • Voter
        • Firewall
  • Mapbender
    • Component
    • CoreBundle
      • Asset
      • Command
      • Component
        • Exception
      • Controller
      • DataFixtures
        • ORM
          • Application
      • DependencyInjection
        • Compiler
      • Element
        • DataTransformer
        • EventListener
        • Type
      • Entity
      • EventListener
      • Extension
      • Form
        • DataTransformer
        • EventListener
        • Type
      • Security
      • Template
      • Tests
        • Controller
      • Utils
      • Validator
        • Constraints
    • DataSourceBundle
      • Component
        • Drivers
          • Interfaces
      • Controller
      • DependencyInjection
      • Element
        • Type
      • Entity
      • Extension
      • Tests
    • DigitizerBundle
      • Component
      • Element
        • Type
      • Entity
      • Utils
    • DrupalIntegrationBundle
      • DependencyInjection
      • Security
        • Authentication
          • Provider
          • Token
        • Authorization
          • Voter
        • Factory
        • Firewall
        • User
      • Session
    • KmlBundle
      • Element
    • ManagerBundle
      • Component
        • Exception
      • Controller
      • Form
        • DataTransformer
        • Type
      • Template
    • MobileBundle
      • DependencyInjection
      • Template
    • PrintBundle
      • Component
      • Element
        • Type
    • WmcBundle
      • Component
        • Exception
      • Element
        • Type
      • Entity
      • Form
        • Type
      • Tests
        • Component
    • WmsBundle
      • Component
        • Exception
      • Controller
      • DependencyInjection
      • Element
        • DataTransformer
        • EventListener
        • Type
      • Entity
      • Event
      • Form
        • DataTransformer
        • EventListener
        • Type
  • None
  • OwsProxy3
    • CoreBundle
      • Component
        • Exception
      • Controller
      • DependencyInjection
      • Entity
      • Event
      • EventListener
      • Worker
  • PHP

Classes

  • Application
  • ApplicationYAMLMapper
  • BoundingBox
  • Element
  • EntityHandler
  • InstanceConfiguration
  • InstanceConfigurationOptions
  • KeywordUpdater
  • MapbenderBundle
  • ProxyService
  • SecurityContext
  • Signer
  • Size
  • SourceEntityHandler
  • SourceInstanceEntityHandler
  • SourceInstanceItemEntityHandler
  • SourceItemEntityHandler
  • SourceMetadata
  • SQLSearchEngine
  • StateHandler
  • Template
  • Utils
  • XmlValidator

Interfaces

  • ContainingKeyword
  • ExtendedCollection
  • SearchEngine

Class Element

Base class for all Mapbender elements.

This class defines all base methods and required instance methods to implement an Mapbender3 element.

Direct known subclasses

Mapbender\CoreBundle\Element\AboutDialog, Mapbender\CoreBundle\Element\ActivityIndicator, Mapbender\CoreBundle\Element\Legend, Mapbender\CoreBundle\Element\Map, Mapbender\CoreBundle\Element\Overview, Mapbender\CoreBundle\Element\POI, Mapbender\CoreBundle\Element\PrintClient, Mapbender\CoreBundle\Element\Redlining, Mapbender\CoreBundle\Element\Ruler, Mapbender\CoreBundle\Element\ScaleBar, Mapbender\CoreBundle\Element\ScaleDisplay, Mapbender\CoreBundle\Element\ScaleSelector, Mapbender\CoreBundle\Element\BaseSourceSwitcher, Mapbender\CoreBundle\Element\SearchRouter, Mapbender\CoreBundle\Element\SimpleSearch, Mapbender\CoreBundle\Element\Sketch, Mapbender\CoreBundle\Element\SrsSelector, Mapbender\CoreBundle\Element\ZoomBar, Mapbender\KmlBundle\Element\KmlExport, Mapbender\PrintBundle\Element\ImageExport, Mapbender\WmcBundle\Element\SuggestMap, Mapbender\WmcBundle\Element\WmcEditor, Mapbender\WmcBundle\Element\WmcList, Mapbender\CoreBundle\Element\Button, Mapbender\WmcBundle\Element\WmcLoader, Mapbender\WmsBundle\Element\DimensionsHandler, Mapbender\WmsBundle\Element\WmsLoader, Mapbender\CoreBundle\Element\CoordinatesDisplay, Mapbender\CoreBundle\Element\Copyright, Mapbender\CoreBundle\Element\FeatureInfo, Mapbender\CoreBundle\Element\GpsPosition, Mapbender\CoreBundle\Element\HTMLElement, Mapbender\CoreBundle\Element\Layertree

Indirect known subclasses

Mapbender\DataSourceBundle\Element\BaseElement, Mapbender\DigitizerBundle\Element\Digitizer

Abstract
Namespace: Mapbender\CoreBundle\Component
Author: Christian Wygoda
Located at Mapbender/CoreBundle/Component/Element.php

Methods summary

public
# __construct( Mapbender\CoreBundle\Component\Application $application, Symfony\Component\DependencyInjection\ContainerInterface $container, Mapbender\CoreBundle\Entity\Element $entity )

The constructor. Every element needs an application to live within and the container to do useful things.

The constructor. Every element needs an application to live within and the container to do useful things.

Parameters

$application
Application component
$container
Container service
$entity
public static string
# getClassTitle( )

Returns the element class title

Returns the element class title

This is primarily used in the manager backend when a list of available elements is given.

Returns

string
string
public static string
# getClassDescription( )

Returns the element class description.

Returns the element class description.

This is primarily used in the manager backend when a list of available elements is given.

Returns

string
string
public static array
# getClassTags( )

Returns the element class tags.

Returns the element class tags.

These tags are used in the manager backend to quickly filter the list of available elements.

Returns

array
array
public static array
# getDefaultConfiguration( )

Returns the default element options.

Returns the default element options.

You should specify all allowed options here with their default value.

Returns

array
array
final public mixed
# get( string $path )

Get a configuration value by path.

Get a configuration value by path.

Get the configuration value or null if the path is not defined. If you ask for an path which has children, the configuration array with these children will be returned.

Configuration paths are lists of parameter keys seperated with a slash like "targets/map".

Parameters

$path
The configuration path to retrieve.

Returns

mixed
mixed
final public
# set( string $path, mixed $value )

Set a configuration value by path.

Set a configuration value by path.

Parameters

$path
the configuration path to set
$value
the value to set
public object
# getEntity( )

Get the configuration entity.

Get the configuration entity.

Returns

object
$entity
public string
# getId( )

Get the element ID

Get the element ID

Returns

string
string
public string
# getTitle( )

Get the element title

Get the element title

Returns

string
string
public string
# getDescription( )

Get the element description

Get the element description

Returns

string
string
public string
# render( )

Render the element HTML fragment.

Render the element HTML fragment.

Returns

string
string
public static array
# listAssets( )

Get the element assets.

Get the element assets.

Returns an array of references to asset files of the given type. Assets are grouped by css and javascript. References can either be filenames/path which are searched for in the Resources/public directory of the element's bundle or assetic references indicating the bundle to search in:

array( 'foo.css'), '@MapbenderCoreBundle/Resources/public/foo.css'));

Returns

array
array
public array
# getAssets( )

Get the element assets.

Get the element assets.

This should be a subset of the static function listAssets. Assets can be removed from the overall list depending on the configuration for example. By default, the same list as by listAssets is returned.

Returns

array
array
public array
# getConfiguration( )

Get the publicly exposed configuration, usually directly derived from the configuration field of the configuration entity. If you, for example, store passwords in your element configuration, you should override this method to return a cleaned up version of your configuration which can safely be exposed in the client.

Get the publicly exposed configuration, usually directly derived from the configuration field of the configuration entity. If you, for example, store passwords in your element configuration, you should override this method to return a cleaned up version of your configuration which can safely be exposed in the client.

Returns

array
array
public string
# getWidgetName( )

Get the function name of the JavaScript widget for this element. This will be called to initialize the element.

Get the function name of the JavaScript widget for this element. This will be called to initialize the element.

Returns

string
string
public Symfony\Component\HttpFoundation\Response
# httpAction( string $action )

Handle element Ajax requests.

Handle element Ajax requests.

Do your magic here.

Parameters

$action
The action to perform

Returns

Symfony\Component\HttpFoundation\Response
Response
public string
# trans( mixed $key, array $parameters = array(), null $domain = null, null $locale = null )

Translate subject by key

Translate subject by key

Parameters

$key
$parameters
$domain
$locale

Returns

string
string
public static string
# getType( )

Get the element configuration form type.

Get the element configuration form type.

Override this method to provide a custom configuration form instead of the default YAML form.

Returns

string
Administration type class name
public static string
# getFormTemplate( )

Get the form template to use.

Get the form template to use.

Returns

string
string
public static array
# getFormAssets( )

Get the form assets.

Get the form assets.

Returns

array
array
public static array
# mergeArrays( array $default, array $main, array $result )

Merges the default configuration array and the configuration array

Merges the default configuration array and the configuration array

Parameters

$default
the default configuration of an element
$main
the configuration of an element
$result
the result configuration

Returns

array
the result configuration
public
# postSave( )

Changes Element after save.

Changes Element after save.

public static array
# getElementForm( Symfony\Component\DependencyInjection\ContainerInterface $container, Mapbender\CoreBundle\Component\Application $application, Mapbender\CoreBundle\Entity\Element $element, boolean $onlyAcl = false )

Create form for given element

Create form for given element

Parameters

$container
$application
$element
$onlyAcl

Returns

array
array
public static Mapbender\CoreBundle\Entity\Element
# getDefaultElement( Mapbender\CoreBundle\Component\Element $class, string $region )

Create default element

Create default element

Parameters

$class
$region

Returns

Mapbender\CoreBundle\Entity\Element
\Mapbender\CoreBundle\Entity\Element
public array
# normalizeConfiguration( array $formConfiguration, array $entityConfiguration = array() )

Changes a element entity configuration while exporting.

Changes a element entity configuration while exporting.

Parameters

$formConfiguration
element entity configuration
$entityConfiguration
element entity configuration

Returns

array
a configuration
public array
# denormalizeConfiguration( array $configuration, Mapbender\ManagerBundle\Component\Mapper $mapper )

Changes a element entity configuration while importing.

Changes a element entity configuration while importing.

Parameters

$configuration
element entity configuration
$mapper
a mapper object

Returns

array
a configuration
protected static mixed
# getTemplateName( mixed $className )

Get template name by class name

Get template name by class name

Parameters

$className

Returns

mixed
mixed
public array
# updateAppConfig( array $configIn )

Hook function for embedded elements to influence the effective application config on initial load. We (can) use this for BaseSourceSwitchter (deactivates layers), SuggestMap element reloading state etc.

Hook function for embedded elements to influence the effective application config on initial load. We (can) use this for BaseSourceSwitchter (deactivates layers), SuggestMap element reloading state etc.

Parameters

$configIn

Returns

array
array

Magic methods summary

Properties summary

public static boolean $ext_api

Extended API. The ext_api defines, if an element can be used as a target element.

Extended API. The ext_api defines, if an element can be used as a target element.

#true
public static boolean $merge_configurations

Merge Configurations. The merge_configurations defines, if the default configuration array and the configuration array should be merged

Merge Configurations. The merge_configurations defines, if the default configuration array and the configuration array should be merged

#true
protected Mapbender\CoreBundle\Component\Application $application

Application component

Application component

#
protected Symfony\Component\DependencyInjection\ContainerInterface $container

Symfony container

Symfony container

#
protected Mapbender\CoreBundle\Entity\Element $entity

Element configuration storage entity

Element configuration storage entity

#
protected array $classNameParts

Class name parts

Class name parts

#
protected static array $defaultConfiguration

Element fefault configuration

Element fefault configuration

#array()
protected static string $description

Element description translation subject

Element description translation subject

#"mb.core.element.class.description"
protected static string $tags

Element title translation subject

Element title translation subject

#array()
protected static string[] $title

Element tag translation subjects

Element tag translation subjects

#"mb.core.element.class.title"
Mapbender 3.0.6.1 API documenation API documentation generated by ApiGen 2.8.0