Plugin.php 699 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. namespace dokuwiki\Action;
  3. use dokuwiki\Extension\Event;
  4. /**
  5. * Class Plugin
  6. *
  7. * Used to run action plugins
  8. *
  9. * @package dokuwiki\Action
  10. */
  11. class Plugin extends AbstractAction {
  12. /** @inheritdoc */
  13. public function minimumPermission() {
  14. return AUTH_NONE;
  15. }
  16. /**
  17. * Outputs nothing but a warning unless an action plugin overwrites it
  18. *
  19. * @inheritdoc
  20. * @triggers TPL_ACT_UNKNOWN
  21. */
  22. public function tplContent() {
  23. $evt = new Event('TPL_ACT_UNKNOWN', $this->actionname);
  24. if($evt->advise_before()) {
  25. msg('Failed to handle action: ' . hsc($this->actionname), -1);
  26. }
  27. $evt->advise_after();
  28. }
  29. }