static_plugin.class.php 769 B

12345678910111213141516171819202122232425262728293031323334353637
  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. /**
  12. *
  13. * @return StaticPlugin
  14. */
  15. static function create()
  16. {
  17. static $result = null;
  18. return $result ? $result : $result = new self();
  19. }
  20. function get_block_title()
  21. {
  22. return $this->get('block_title');
  23. }
  24. function get_content()
  25. {
  26. return $this->get('content');
  27. }
  28. protected function __construct()
  29. {
  30. parent::__construct('1.1', 'Laurent Opprecht', array('block_title' => 'text', 'content' => 'wysiwyg'));
  31. }
  32. }