Event.class.php 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. <?php
  2. /* For licensing terms, see /license.txt */
  3. require_once 'Resource.class.php';
  4. /**
  5. * Event backup script
  6. * @author Bart Mollet <bart.mollet@hogent.be>
  7. * @package chamilo.backup
  8. */
  9. class CalendarEvent extends Coursecopy\Resource
  10. {
  11. /**
  12. * The title
  13. */
  14. public $title;
  15. /**
  16. * The content
  17. */
  18. public $content;
  19. /**
  20. * The start date
  21. */
  22. public $start_date;
  23. /**
  24. * The end date
  25. */
  26. public $end_date;
  27. /**
  28. * The attachment path
  29. */
  30. public $attachment_path;
  31. /**
  32. * The attachment filename
  33. */
  34. public $attachment_filename;
  35. /**
  36. * The attachment size
  37. */
  38. public $attachment_size;
  39. /**
  40. * The attachment comment
  41. */
  42. public $attachment_comment;
  43. /**
  44. * Create a new Event
  45. * @param int $id
  46. * @param string $title
  47. * @param string $content
  48. */
  49. public function __construct(
  50. $id,
  51. $title,
  52. $content,
  53. $start_date,
  54. $end_date,
  55. $attachment_path = null,
  56. $attachment_filename = null,
  57. $attachment_size = null,
  58. $attachment_comment = null,
  59. $all_day = 0
  60. ) {
  61. parent::__construct($id, RESOURCE_EVENT);
  62. $this->title = $title;
  63. $this->content = $content;
  64. $this->start_date = $start_date;
  65. $this->end_date = $end_date;
  66. $this->all_day = $all_day;
  67. $this->attachment_path = $attachment_path;
  68. $this->attachment_filename = $attachment_filename;
  69. $this->attachment_size = $attachment_size;
  70. $this->attachment_comment = $attachment_comment;
  71. }
  72. /**
  73. * Show this Event
  74. */
  75. public function show()
  76. {
  77. parent::show();
  78. echo $this->title.' ('.$this->start_date.' -> '.$this->end_date.')';
  79. }
  80. }