class Notifications_Comment in Notifications 7
Hierarchy
- class \Notifications_Comment extends \Notifications_Object
Expanded class hierarchy of Notifications_Comment
1 string reference to 'Notifications_Comment'
- notifications_content_notifications in notifications_content/
notifications_content.module - Implementation of hook_notifications()
File
- notifications_content/
notifications_content.inc, line 98 - Drupal Notifications Framework - Default class file
View source
class Notifications_Comment extends Notifications_Object {
public $type = 'comment';
public function get_title() {
return t('Comment');
}
/**
* Check user access
*/
function user_access($account) {
if ($comment = $this
->get_object()) {
return $comment->status == COMMENT_PUBLISHED && user_access('access comments', $account) || user_access('administer comments', $account);
}
}
/**
* Load related object or data
*/
public static function object_load($value) {
return comment_load($value);
}
/**
* Get object name, unfiltered string
*/
public static function object_name($object) {
return $comment->title;
}
/**
* Get object key
*/
public static function object_value($object) {
return $object->cid;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
Notifications_Comment:: |
public | property | ||
Notifications_Comment:: |
public | function | ||
Notifications_Comment:: |
public static | function | Load related object or data | |
Notifications_Comment:: |
public static | function | Get object name, unfiltered string | |
Notifications_Comment:: |
public static | function | Get object key | |
Notifications_Comment:: |
function | Check user access |