vendor/con4gis/core/Resources/contao/config/config.php line 55

Open in your IDE?
  1. <?php
  2. /**
  3.  * con4gis - the gis-kit
  4.  *
  5.  * @version   php 7
  6.  * @package   con4gis
  7.  * @author    con4gis contributors (see "authors.txt")
  8.  * @license   GNU/LGPL http://opensource.org/licenses/lgpl-3.0.html
  9.  * @copyright Küstenschmiede GmbH Software & Design 2011 - 2018
  10.  * @link      https://www.kuestenschmiede.de
  11.  */
  12. use \con4gis\CoreBundle\Classes\Contao\Hooks\con4gisInsertTags;
  13. $GLOBALS['con4gis']['version'] = '4.3';
  14. $GLOBALS['con4gis']['core']['installed'] = true;
  15. // API-Registration
  16. //ToDO so werden die Klassen nicht gefunden
  17. $GLOBALS['TL_API'] = array();
  18. $GLOBALS['TL_API']['fileUpload']  = 'con4gis\CoreBundle\Classes\C4GFileUpload';
  19. $GLOBALS['TL_API']['imageUpload'] = 'con4gis\CoreBundle\Resources\contao\classes\C4GImageUpload';
  20. $GLOBALS['TL_API']['deliver']     = 'con4gis\CoreBundle\Resources\contao\classes\C4GDeliverFileApi';
  21. array_insert($GLOBALS['BE_MOD'], array_search('content'array_keys($GLOBALS['BE_MOD'])) + 1, array('con4gis' => array()));
  22. array_insert($GLOBALS['BE_MOD'], array_search('content'array_keys($GLOBALS['BE_MOD'])) + 2, array('con4gis_bricks' => array()));
  23. /** Damit die CSS nicht nur im Modul selbst geladen wird */
  24. if(TL_MODE == "BE") {
  25.     $GLOBALS['TL_CSS'][] = '/bundles/con4giscore/con4gis.css';
  26. }
  27. $GLOBALS['con4gis']['stringClass'] = '\Contao\StringUtil';
  28. /**
  29.  * Backend Modules
  30.  */
  31. array_insert($GLOBALS['BE_MOD'], array_search('content'array_keys($GLOBALS['BE_MOD'])) + 1, array
  32. (
  33.     'con4gis' => array
  34.     (
  35.         'c4g_core' => array
  36.         (
  37.             'callback' => 'con4gis\CoreBundle\Resources\contao\classes\C4GInfo'
  38.         ),
  39.         'c4g_settings' => array(
  40.             'tables'        => array('tl_c4g_settings')
  41.         )
  42.     )
  43. ));
  44. if(TL_MODE == "FE") {
  45.     // TODO replace with symfony csrf token
  46.     $rq = \Contao\RequestToken::get();
  47.     $GLOBALS['TL_HEAD'][] = "<script>var c4g_rq = '" $rq "';</script>";
  48. }
  49. $apiBaseUrl 'con4gis/api';
  50. $GLOBALS['TL_HEAD'][] = "<script>var apiBaseUrl = '" $apiBaseUrl "';</script>";
  51. /**
  52.  * Content Elements
  53.  */
  54. array_insert($GLOBALS['TL_CTE']['con4gis'], 2, array
  55. (
  56.     'tables' => array('tl_c4g_activationkey'),
  57.     'c4g_activationpage' => 'con4gis\CoreBundle\Resources\contao\modules\ContentC4gActivationpage'
  58. ));
  59. $GLOBALS['TL_MODELS']['tl_c4g_activationkey'] = 'con4gis\CoreBundle\Resources\contao\models\C4gActivationkeyModel';
  60. $GLOBALS['TL_MODELS']['tl_c4g_settings'] = 'con4gis\CoreBundle\Resources\contao\models\C4gSettingsModel';
  61. /**
  62.  * Purge jobs
  63.  */
  64. $GLOBALS['TL_PURGE']['folders']['con4gis'] = array
  65. (
  66.     'callback' => array('con4gis\CoreBundle\Resources\contao\classes\C4GAutomator''purgeApiCache'),
  67.     'affected' => array('var/cache/prod/con4gis')
  68. );
  69. /**
  70.  * Con4Gis Caching
  71.  *
  72.  * caching is not auto-enabled. To register a service to be cached, insert it in the GLOBALS-Array
  73.  * eg: $GLOBALS['CON4GIS']['USE_CACHE']['SERVICES'][] = "layerService"; => layerService requests are cached
  74.  *
  75.  * it is also possible to enable caching while existence of defined get parameters and values
  76.  * eg: $GLOBALS['CON4GIS']['USE_CACHE']['PARAMS']['method'] = array('getLive'); => request with method=getLive will be cached
  77.  *
  78.  */
  79. if (!$GLOBALS['CON4GIS']['USE_CACHE'])
  80. {
  81.     $GLOBALS['CON4GIS']['USE_CACHE'] = array();
  82.     $GLOBALS['CON4GIS']['USE_CACHE']['SERVICES'] = array();
  83.     $GLOBALS['CON4GIS']['USE_CACHE']['PARAMS'] = array();
  84. }
  85. /**
  86.  * replace con4gis insertTags
  87.  */
  88. $GLOBALS['TL_HOOKS']['replaceInsertTags'][] = array('\con4gis\CoreBundle\Classes\Contao\Hooks\con4gisInsertTags''replaceTag');