Plugin.php 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <?php
  2. namespace Kanboard\Plugin\EncryptedContent;
  3. use Kanboard\Core\Translator;
  4. use Kanboard\Core\Plugin\Base;
  5. class Plugin extends Base
  6. {
  7. public function initialize()
  8. {
  9. if ($this->request->isHTTPS()) {
  10. //Helpers
  11. $this->helper->register('EncryptedContentHelper', 'Kanboard\Plugin\EncryptedContent\Helper\EncryptedContentHelper');
  12. //Task
  13. $this->template->hook->attach('template:task:sidebar:information', 'EncryptedContent:task/sidebar');
  14. //Js
  15. $this->hook->on('template:layout:js', array('template' => 'plugins/EncryptedContent/Assets/js/jquery.copy-to-clipboard.js'));
  16. } else {
  17. $this->template->hook->attach('template:task:sidebar:information', 'EncryptedContent:task/sidebarnohttps');
  18. }
  19. }
  20. public function onStartup()
  21. {
  22. Translator::load($this->languageModel->getCurrentLanguage(), __DIR__.'/Locale');
  23. }
  24. public function getClasses()
  25. {
  26. return [
  27. 'Plugin\EncryptedContent\Model' => [
  28. 'EncryptedContentModel',
  29. ],
  30. ];
  31. }
  32. public function getPluginName()
  33. {
  34. return 'EncryptedContent';
  35. }
  36. public function getPluginDescription()
  37. {
  38. return t('This plugin allows the insertion of text content encrypted in the kanboard database, with the use of random keys, GDPR compliance.');
  39. }
  40. public function getPluginAuthor()
  41. {
  42. return 'Valentino Pesce';
  43. }
  44. public function getPluginVersion()
  45. {
  46. return '1.0.1';
  47. }
  48. public function getCompatibleVersion()
  49. {
  50. return '>=1.0.48';
  51. }
  52. public function getPluginHomepage()
  53. {
  54. return 'https://github.com/kenlog/EncryptedContent';
  55. }
  56. }