ElggWire.php 869 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. /**
  3. * ElggWire Class
  4. *
  5. * @property string $method The method used to create the wire post (site, sms, api)
  6. * @property bool $reply Whether this wire post was a reply to another post
  7. * @property int $wire_thread The identifier of the thread for this wire post
  8. */
  9. class ElggWire extends ElggObject {
  10. /**
  11. * Set subtype to thewire
  12. *
  13. * @return void
  14. */
  15. protected function initializeAttributes() {
  16. parent::initializeAttributes();
  17. $this->attributes['subtype'] = 'thewire';
  18. }
  19. /**
  20. * Can a user comment on this wire post?
  21. *
  22. * @see ElggObject::canComment()
  23. *
  24. * @param int $user_guid User guid (default is logged in user)
  25. * @return bool
  26. * @since 1.8.0
  27. */
  28. public function canComment($user_guid = 0) {
  29. $result = parent::canComment($user_guid);
  30. if ($result == false) {
  31. return $result;
  32. }
  33. return false;
  34. }
  35. }