Overview

Namespaces

  • Mapbender
    • Component
      • HTTP
    • CoreBundle
      • Command
      • Component
        • Exception
      • Controller
      • DataFixtures
        • ORM
      • DependencyInjection
      • Element
        • Type
      • Entity
      • EventListener
      • Extension
      • Form
        • DataTransformer
        • EventListener
        • Type
      • Security
      • Template
    • KmlBundle
      • Element
    • ManagerBundle
      • Controller
      • Form
        • DataTransformer
        • Type
    • MonitoringBundle
      • Command
      • Component
      • Controller
      • DependencyInjection
      • Entity
      • EventListener
      • Form
    • PrintBundle
      • Component
      • Controller
    • WmcBundle
      • Component
        • Exception
      • Element
        • Type
      • Entity
      • Form
        • Type
    • WmsBundle
      • Component
        • Exception
      • Controller
      • DependencyInjection
      • Element
        • Type
      • Entity
      • Event
      • Form
        • EventListener
        • Type
    • WmtsBundle
      • Component
        • Exception
      • Controller
      • Entity
      • Form
        • Type
  • None
  • PHP

Classes

  • Application
  • ApplicationYAMLMapper
  • BoundingBox
  • Element
  • InstanceConfiguration
  • InstanceConfigurationOptions
  • MapbenderBundle
  • ProxyService
  • SQLSearchEngine
  • StateHandler
  • Template
  • Utils

Interfaces

  • InstanceLayerIn
  • SearchEngine
  • Overview
  • Namespace
  • Class
  • Tree
  • Deprecated
  • Todo
  • Download

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\Overview, Mapbender\CoreBundle\Element\PrintClient, Mapbender\CoreBundle\Element\Ruler, Mapbender\CoreBundle\Element\ScaleBar, Mapbender\CoreBundle\Element\ScaleSelector, Mapbender\CoreBundle\Element\SearchRouter, Mapbender\CoreBundle\Element\SrsSelector, Mapbender\CoreBundle\Element\ZoomBar, Mapbender\KmlBundle\Element\KmlExport, Mapbender\WmcBundle\Element\WmcEditor, Mapbender\CoreBundle\Element\Button, Mapbender\WmcBundle\Element\WmcStorage, Mapbender\WmsBundle\Element\WmsLoader, Mapbender\CoreBundle\Element\CoordinatesDisplay, Mapbender\CoreBundle\Element\Copyright, Mapbender\CoreBundle\Element\FeatureInfo, Mapbender\CoreBundle\Element\GpsPosition, Mapbender\CoreBundle\Element\Layertree, Mapbender\CoreBundle\Element\Legend, Mapbender\CoreBundle\Element\Map
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
Mapbender\CoreBundle\Component\Application
$application The application object
$container
Symfony\Component\DependencyInjection\ContainerInterface
$container The container object
$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
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
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
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
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
string
$path The configuration path to retrieve.

Returns

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

Set a configuration value by path.

Set a configuration value by path.

Parameters

$path
string
$path the configuration path to set
$value
mixed
$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
public string
# getTitle( )

Get the element title

Get the element title

Returns

string
public string
# getDescription( )

Get the element description

Get the element description

Returns

string
abstract public string
# render( )

Render the element HTML fragment.

Render the element HTML fragment.

Returns

string
public array
# getAssets( )

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
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
abstract 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
public Response
# httpAction( string $action )

Handle element Ajax requests.

Handle element Ajax requests.

Do your magic here.

Parameters

$action
string
$action The action to perform

Returns

Response
public static Symfony\Component\FormTypeInterface
# 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

Symfony\Component\FormTypeInterface
public static string
# getFormTemplate( )

Get the form template to use.

Get the form template to use.

Returns

string
public static array
# getFormAssets( )

Get the form assets.

Get the form assets.

Returns

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
array
$default the default configuration of an element
$main
array
$main the configuration of an element
$result
array
$result the result configuration

Returns

array
the result configuration
public
# postSave( )

Post save

Post save

Properties summary
protected Mapbender\CoreBundle\Component\Application $application
#

Application

Application

protected ContainterInterface $container
#

Container

Container

protected Mapbender\CoreBundle\Entity\Element $entity
#

Entity

Entity

Mapbender3 API documenation API documentation generated by ApiGen 2.8.0