vendor/blackbit/data-director/DependencyInjection/Configuration.php line 35

Open in your IDE?
  1. <?php
  2. /**
  3.  * Copyright Blackbit digital Commerce GmbH <info@blackbit.de>
  4.  *
  5.  * This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
  6.  *
  7.  * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  8.  *
  9.  * You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  10.  */
  11. namespace Blackbit\DataDirectorBundle\DependencyInjection;
  12. use Symfony\Component\Config\Definition\Builder\TreeBuilder;
  13. use Symfony\Component\Config\Definition\ConfigurationInterface;
  14. use Symfony\Component\HttpKernel\Kernel;
  15. /**
  16.  * This is the class that validates and merges configuration from your app/config files.
  17.  *
  18.  * To learn more see {@link http://symfony.com/doc/current/cookbook/bundles/configuration.html}
  19.  */
  20. class Configuration implements ConfigurationInterface
  21. {
  22.     /**
  23.      * {@inheritdoc}
  24.      */
  25.     public function getConfigTreeBuilder()
  26.     {
  27.         if (Kernel::MAJOR_VERSION >= 5) {
  28.             $treeBuilder = new TreeBuilder('blackbit_data_director');
  29.             $rootNode $treeBuilder->getRootNode();
  30.         } else {
  31.             $treeBuilder = new TreeBuilder();
  32.             $rootNode $treeBuilder->root('blackbit_data_director');
  33.         }
  34.         $rootNode
  35.             ->children()
  36.                 ->arrayNode('queue_processing')
  37.                     ->children()
  38.                         ->booleanNode('automatic_start')
  39.                             ->info('Automatically start queue processing when a new job gets added to the queue')
  40.                         ->end()
  41.                     ->end()
  42.                 ->end()
  43.                 ->arrayNode('text_generation')
  44.                     ->children()
  45.                         ->scalarNode('openai_api_key')
  46.                             ->info('API key to use for automatic text generation with OpenAI API')
  47.                         ->end()
  48.                     ->end()
  49.                 ->end()
  50.                 ->arrayNode('translation')
  51.                     ->children()
  52.                         ->arrayNode('languages')
  53.                             ->info('Define which target language shall be used for certain Pimcore languages, e.g. en: en-gb')
  54.                             ->useAttributeAsKey('language')
  55.                             ->prototype('scalar')
  56.                         ->end()
  57.                     ->end()
  58.                 ->end()
  59.             ->end();
  60.         return $treeBuilder;
  61.     }
  62. }