Announcement.class.php 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. <?php
  2. /* For licensing terms, see /license.txt */
  3. require_once 'Resource.class.php';
  4. /**
  5. * An announcement
  6. * @author Bart Mollet <bart.mollet@hogent.be>
  7. * @package chamilo.backup
  8. */
  9. class Announcement extends Coursecopy\Resource
  10. {
  11. /**
  12. * The title of the announcement
  13. */
  14. public $title;
  15. /**
  16. * The content of the announcement
  17. */
  18. public $content;
  19. /**
  20. * The date on which this announcement was made
  21. */
  22. public $date;
  23. /**
  24. * The display order of this announcement
  25. */
  26. public $display_order;
  27. /**
  28. * Has the e-mail been sent?
  29. */
  30. public $email_sent;
  31. public $attachment_path;
  32. public $attachment_filename;
  33. public $attachment_size;
  34. public $attachment_comment;
  35. /**
  36. * Create a new announcement
  37. * @param int $id
  38. * @param string $title
  39. * @param string $content
  40. * @param string $date
  41. * @param int display_order
  42. */
  43. public function __construct(
  44. $id,
  45. $title,
  46. $content,
  47. $date,
  48. $display_order,
  49. $email_sent,
  50. $path,
  51. $filename,
  52. $size,
  53. $comment
  54. ) {
  55. parent::__construct($id,RESOURCE_ANNOUNCEMENT);
  56. $this->content = $content;
  57. $this->title = $title;
  58. $this->date = $date;
  59. $this->display_order = $display_order;
  60. $this->email_sent = $email_sent;
  61. $this->attachment_path = $path;
  62. $this->attachment_filename = $filename;
  63. $this->attachment_size = $size;
  64. $this->attachment_comment = $comment;
  65. }
  66. /**
  67. * Show this announcement
  68. */
  69. function show()
  70. {
  71. parent::show();
  72. echo $this->date.': '.$this->title;
  73. }
  74. }