GoogleMapsPlugin.php 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <?php
  2. /* For licensing terms, see /license.txt */
  3. /**
  4. * The google maps class allows to use
  5. * @author José Loguercio Silva <jose.loguercio@beeznest.com>
  6. * @package chamilo.plugin.google_maps
  7. */
  8. class GoogleMapsPlugin extends Plugin
  9. {
  10. /**
  11. * Class constructor
  12. */
  13. protected function __construct()
  14. {
  15. $parameters = array(
  16. 'enable_api' => 'boolean',
  17. 'api_key' => 'text',
  18. 'extra_field_name' => 'text'
  19. );
  20. parent::__construct('1.0', 'José Loguercio Silva', $parameters);
  21. }
  22. /**
  23. * Get the plugin Name
  24. *
  25. * @return string
  26. */
  27. public function get_name()
  28. {
  29. return "google_maps";
  30. }
  31. /**
  32. * Instance the plugin
  33. * @staticvar null $result
  34. * @return GoogleMapsPlugin
  35. */
  36. static function create()
  37. {
  38. static $result = null;
  39. return $result ? $result : $result = new self();
  40. }
  41. /**
  42. * Install the plugin
  43. * @return void
  44. */
  45. public function install()
  46. {
  47. return true;
  48. }
  49. /**
  50. * Uninstall the plugin
  51. * @return void
  52. */
  53. public function uninstall()
  54. {
  55. return true;
  56. }
  57. }