# Base plugin class

1. <?php
2. /**
3. * Base plugin class
4. *
5. * @author Mark Nielsen
6. */
8. defined('MOODLE_INTERNAL') or die('Direct access to this script is forbidden.');
10. require($CFG->dirroot.'/local/mr/bootstrap.php');
12. abstract class block_helloworld_plugin_base_class extends mr_plugin {
13. /**
14. * Helper
15. *
16. * @var mr_helper
17. */
18. protected $helper;
20. /**
21. * Commonly you want to make helper readily available
22. */
23. public function __construct() {
24. $this->helper = new mr_helper('blocks/helloworld');
25. }
27. /**
28. * Implement abstract method of mr_plugin
29. */
30. public function get_component() {
31. return 'block_helloworld';
32. }
34. /**
35. * Custom abstract method
36. *
37. * @return string
38. */
39. abstract public function abstract_method();
41. /**
42. * Parent method
43. *
44. * @return string
45. */
46. public function parent_method() {
47. return 'Parent method called';
48. }
49. }

Documentation generated on Thu, 28 Jun 2012 16:33:50 -0700 by phpDocumentor 1.4.3