static_plugin.class.php 779 B

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. /**
  3. * Description of static_plugin.
  4. *
  5. * @copyright (c) 2012 University of Geneva
  6. * @license GNU General Public License - http://www.gnu.org/copyleft/gpl.html
  7. * @author Laurent Opprecht <laurent@opprecht.info>
  8. */
  9. class StaticPlugin extends Plugin
  10. {
  11. protected function __construct()
  12. {
  13. parent::__construct('1.1', 'Laurent Opprecht', ['block_title' => 'text', 'content' => 'wysiwyg']);
  14. }
  15. /**
  16. * @return StaticPlugin
  17. */
  18. public static function create()
  19. {
  20. static $result = null;
  21. return $result ? $result : $result = new self();
  22. }
  23. public function get_block_title()
  24. {
  25. return $this->get('block_title');
  26. }
  27. public function get_content()
  28. {
  29. return $this->get('content');
  30. }
  31. }