Directory structure in Mapbender¶
application¶
Only in Git-based installations, the application directory contains the default Mapbender application. Some important subdirectories and files are:
the config directory,
the application kernel (src/Kernel.php) as entry point to the Symfony application,
the Autoloading (vendor/autoload.php), auto-generated by Composer,
the command line applications for maintaining and management tasks (
bin/console
,bin/phpunit
) and.env and .env.local: Global configuration files, e.g. for database urls and smtp server connection.
bin¶
Here you find some libraries.
config¶
Basic configuration files of Mapbender are placed in the config/ directory and the config/packages directory. These files are of particular importance:
config/applications¶
The directory config/applications contains all applications that are defined in a YAML file.
Find more information in YAML Configuration (Configuration and Application files) .
mapbender¶
Directory of the Mapbender submodule. Provides the Mapbender-specific bundles and the Mapbender code.
Directory for application resources (Resources/)
mapbender/…../translations¶
The translations are stored in YAML files. Every language needs a YAML-file, like messages.fr.yaml for the French translation of Mapbender.
Directory path: ../mapbender/src/Mapbender/CoreBundle/Resources/translations/
public¶
This directory has to be published by the webserver. The alias has to refer to this directory.
It controls:
index.php: The FrontendController (PHP script which can be called). Uses the productive or development mode depending on the definition of the APP_ENV variable, see .env or .env.local file.
index_dev.php: Always uses the dev environment. Per default, access is only allowed from localhost. Find out more about giving access to other IP addresses in Production and Development environment and Caching.
public/ also contains the static resources like css, js, favicon etc.
public/bundles¶
Is the storage for the static resources of the single bundles.
The following command copies the resources from the bundles to the folder:
bin/console assets:install --symlink --relative public
Note
If you use Windows, you cannot create symbolic links and therefore have to run the command php.exe bin/console assets:install public
to copy the files to the public directory after every change in JavaScript-, css-, twig- or image files.
src¶
Directory for application specific code and resources.
The application kernel (src/Kernel.php) is called by the FrontendControllers and controls the whole application.
var¶
This directory contains:
the caches (var/cache/dev and var/cache/prod),
the logs (var/log),
Sqlite-databases (var/db/).
vendor¶
Directory for external libraries (loaded by Composer) are placed here. Resources are used by Symfony using Autoloading:
Autoloading: autoload.php