connectorAction.php 767 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. /* For licensing terms, see /license.txt */
  3. require_once __DIR__.'/../../global.inc.php';
  4. use Chamilo\CoreBundle\Component\Editor\Connector;
  5. use Chamilo\CoreBundle\Component\Editor\Finder;
  6. error_reporting(-1);
  7. /** @var Connector $connector */
  8. $connector = new Connector();
  9. // Check driver list in configuration
  10. $driverList = api_get_configuration_value('editor_driver_list');
  11. if (empty($driverList)) {
  12. $driverList = array(
  13. 'PersonalDriver',
  14. 'CourseDriver',
  15. //'CourseUserDriver',
  16. //'HomeDriver'
  17. );
  18. }
  19. $connector->setDriverList($driverList);
  20. $operations = $connector->getOperations();
  21. // Run elFinder
  22. $finder = new Finder($operations);
  23. $elFinderConnector = new \elFinderConnector($finder);
  24. $elFinderConnector->run();