19.include.cache.php 825 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. /**
  3. * Tagger
  4. *
  5. * DESCRIPTION
  6. *
  7. * This plugin inject JS to add Tab with tag groups into Resource panel
  8. */
  9. $corePath = $modx->getOption('tagger.core_path', null, $modx->getOption('core_path', null, MODX_CORE_PATH) . 'components/tagger/');
  10. /** @var Tagger $tagger */
  11. $tagger = $modx->getService(
  12. 'tagger',
  13. 'Tagger',
  14. $corePath . 'model/tagger/',
  15. array(
  16. 'core_path' => $corePath
  17. )
  18. );
  19. $className = 'Tagger' . $modx->event->name;
  20. $modx->loadClass('TaggerPlugin', $tagger->getOption('modelPath') . 'tagger/events/', true, true);
  21. $modx->loadClass($className, $tagger->getOption('modelPath') . 'tagger/events/', true, true);
  22. if (class_exists($className)) {
  23. /** @var TaggerPlugin $handler */
  24. $handler = new $className($modx, $scriptProperties);
  25. $handler->run();
  26. }
  27. return;
  28. return;