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 Application

Application is the main Mapbender3 class.

This class is the controller for each application instance. The application class will not perform any access checks, this is due to the controller instantiating an application. The controller should check with the configuration entity to get a list of allowed roles and only then decide to instantiate a new application instance based on the configuration entity.

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

Methods summary

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

Parameters

$container
The container
$entity
The configuration entity
$urls
Array of runtime URLs
public Mapbender\CoreBundle\Entity\Application
# getEntity( )

Get the configuration entity.

Get the configuration entity.

Returns

Mapbender\CoreBundle\Entity\Application
$entity
public integer
# getId( )

Get the application ID

Get the application ID

Returns

integer
integer
public string
# getSlug( )

Get the application slug

Get the application slug

Returns

string
string
public string
# getTitle( )

Get the application title

Get the application title

Returns

string
string
public string
# getDescription( )

Get the application description

Get the application description

Returns

string
string
public string
# render( string $format = 'html', boolean $html = true, boolean $css = true, boolean $js = true, boolean $trans = true )

Render the application

Render the application

Parameters

$format
Output format, defaults to HTML
$html
Whether to render the HTML itself
$css
Whether to include the CSS links
$js
Whether to include the JavaScript
$trans

Returns

string
$html The rendered HTML
public static array
# listAssets( )

Lists assets.

Lists assets.

Returns

array
array
public array
# getAssets( string $type )

Get the assets as an AsseticCollection. Filters can be applied later on with the ensureFilter method.

Get the assets as an AsseticCollection. Filters can be applied later on with the ensureFilter method.

Parameters

$type
Can be 'css' or 'js' to indicate which assets to dump

Returns

array
array
public Assetic\Asset\StringAsset
# getCustomCssAsset( )

Returns

Assetic\Asset\StringAsset
StringAsset
public string
# getConfiguration( )

Get the configuration (application, elements, layers) as an StringAsset. Filters can be applied later on with the ensureFilter method.

Get the configuration (application, elements, layers) as an StringAsset. Filters can be applied later on with the ensureFilter method.

Returns

string
Configuration as JSON string
public Mapbender\CoreBundle\Component\Element
# getElement( string $id )

Return the element with the given id

Return the element with the given id

Parameters

$id
The element id

Returns

Mapbender\CoreBundle\Component\Element
ElementComponent
public Mapbender\CoreBundle\Component\Template
# getTemplate( )

Get template object

Get template object

Returns

Mapbender\CoreBundle\Component\Template
Template
public Doctrine\ORM\PersistentCollection
# getElements( string $regionName = null )

Get region elements, optionally by region

Get region elements, optionally by region

Parameters

$regionName
Region to get elements for. If null, all elements are returned.

Returns

Doctrine\ORM\PersistentCollection
Regions
public Mapbender\CoreBundle\Entity\Layerset[]
# getLayersets( )

Returns all layer sets

Returns all layer sets

Returns

Mapbender\CoreBundle\Entity\Layerset[]
Layer sets
public static string
# generateSlug( Symfony\Component\DependencyInjection\ContainerInterface $container, string $slug, string $suffix = 'copy' )

Checks and generates a valid slug.

Checks and generates a valid slug.

Parameters

$container
container
$slug
slug to check
$suffix

Returns

string
a valid generated slug
public static string
# getUploadsDir( Symfony\Component\DependencyInjection\ContainerInterface $container, boolean $webRelative = false )

Returns the public "uploads" directory.

Returns the public "uploads" directory.

Parameters

$container
Container
$webRelative

Returns

string
the path to uploads dir or null.
public static boolean
# getAppWebDir( Symfony\Component\DependencyInjection\ContainerInterface $container, string $slug )

Returns the application's public directory.

Returns the application's public directory.

Parameters

$container
Container
$slug
application's slug

Returns

boolean
true if the application's directories are created or exist otherwise false.
public static boolean
# createAppWebDir( Symfony\Component\DependencyInjection\ContainerInterface $container, string $slug, string $old_slug = null )

Creates or checks if the application's public directory is created or exist.

Creates or checks if the application's public directory is created or exist.

Parameters

$container
Container
$slug
application's slug
$old_slug
the old application's slug.

Returns

boolean
true if the application's directories are created or exist otherwise false.
public static boolean
# removeAppWebDir( Symfony\Component\DependencyInjection\ContainerInterface $container, string $slug )

Removes application's public directoriy.

Removes application's public directoriy.

Parameters

$container
Container
$slug
application's slug

Returns

boolean
true if the directories are removed or not exist otherwise false
public static string
# getAppWebUrl( Symfony\Component\DependencyInjection\ContainerInterface $container, string $slug )

Returns an url to application's public directory.

Returns an url to application's public directory.

Parameters

$container
Container
$slug
application's slug

Returns

string
a url to wmc directory or to file with "$filename"
public static string
# getUploadsUrl( Symfony\Component\DependencyInjection\ContainerInterface $container )

Returns an url to public "uploads" directory.

Returns an url to public "uploads" directory.

Parameters

$container
Container

Returns

string
an url to public "uploads" directory
public static string
# getBaseUrl( Symfony\Component\DependencyInjection\ContainerInterface $container )

Returns a base url.

Returns a base url.

Parameters

$container
Container

Returns

string
a base url
public static boolean
# copyAppWebDir( Symfony\Component\DependencyInjection\ContainerInterface $container, string $srcSslug, string $destSlug )

Copies an application web order.

Copies an application web order.

Parameters

$container
Container
$srcSslug
source application slug
$destSlug
destination application slug

Returns

boolean
true if the application order has been copied otherwise false.
protected Mapbender\CoreBundle\Component\Element[]
# sortElementsByWidth( mixed $elements )

Sort region elements by width

Sort region elements by width

Parameters

$elements

Returns

Mapbender\CoreBundle\Component\Element[]
ElementComponent[]
protected
# getGrantedRegionElementCollections( )

Get granted elements

Get granted elements

public boolean
# isElementGranted( Mapbender\CoreBundle\Entity\Element $element, string $permission = Mapbender\CoreBundle\Component\SecurityContext::PERMISSION_VIEW )

Is element granted?

Is element granted?

If there is no ACL's or roles then ever granted

Parameters

$element
$permission
SecurityContext::PERMISSION_

Returns

boolean
bool
public
# addViewPermissions( )

Add view permissions

Add view permissions

Magic methods summary

Properties summary

protected Symfony\Component\DependencyInjection\ContainerInterface $container

$container The container

$container The container

#
protected Mapbender\CoreBundle\Component\Template $template

$template The application template class

$template The application template class

#
protected array $elements

$elements The elements, ordered by weight

$elements The elements, ordered by weight

#
protected array $layers

$layers The layers

$layers The layers

#
protected array $urls

$urls Runtime URLs

$urls Runtime URLs

#
protected Mapbender\CoreBundle\Entity\Application $entity
#
Mapbender 3.0.6.1 API documenation API documentation generated by ApiGen 2.8.0