Elgg  Version 2.3
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 
33  public function canComment($user_guid = 0, $default = null) {
34  if (!isset($default)) {
35  $default = false;
36  }
37  return parent::canComment($user_guid, $default);
38  }
39 
46  public function save($update_last_action = true) {
48  if ($result && $update_last_action) {
49  $container = $this->getContainerEntity();
50  if ($container) {
51  $container->updateLastAction($this->time_updated);
52  }
53  }
54  return $result;
55  }
56 }
$default
Definition: checkbox.php:34
$container
Definition: delete.php:29
elgg river item elgg form comment save
initializeAttributes()
Set subtype to comment.
Definition: ElggComment.php:16
save($update_last_action=true)
Update container entity last action on successful save.
Definition: ElggComment.php:46
getContainerEntity()
Get the container entity for this object.
$user_guid
Avatar remove action.
Definition: remove.php:6
canComment($user_guid=0, $default=null)
Can a user comment on this object? Always returns false (threaded comments not yet supported) ...
Definition: ElggComment.php:33