Elgg  Version 2.2
 All Classes Namespaces Files Functions Variables Pages
ElggComment.php
Go to the documentation of this file.
1 <?php
9 class ElggComment extends \ElggObject {
10 
16  protected function initializeAttributes() {
17  parent::initializeAttributes();
18 
19  $this->attributes['subtype'] = "comment";
20  }
21 
32  public function canComment($user_guid = 0) {
33  return false;
34  }
35 
42  public function save($update_last_action = true) {
43  $result = parent::save();
44  if ($result && $update_last_action) {
45  update_entity_last_action($this->container_guid, $this->time_updated);
46  }
47  return $result;
48  }
49 }
canComment($user_guid=0)
Can a user comment on this object? Always returns false (threaded comments not yet supported) ...
Definition: ElggComment.php:32
update_entity_last_action($guid, $posted=null)
Update the last_action column in the entities table for $guid.
Definition: entities.php:747
initializeAttributes()
Set subtype to comment.
Definition: ElggComment.php:16
$comment container_guid
Definition: save.php:59
save($update_last_action=true)
Update container entity last action on successful save.
Definition: ElggComment.php:42
$user_guid
Avatar remove action.
Definition: remove.php:6