class Notifications_Taxonomy_Term_Create_Event in Notifications 7
Node events
Hierarchy
- class \Notifications_Taxonomy_Term_Create_Event extends \Notifications_Event
Expanded class hierarchy of Notifications_Taxonomy_Term_Create_Event
1 string reference to 'Notifications_Taxonomy_Term_Create_Event'
- notifications_tags_notifications in notifications_tags/
notifications_tags.module - Implementation of hook_notifications().
File
- notifications_tags/
notifications_tags.inc, line 302 - Drupal Notifications Framework - Default class file
View source
class Notifications_Taxonomy_Term_Create_Event extends Notifications_Event {
/**
* Set main object id and vocabulary id when term is added
*/
public function set_object($object) {
if ($object->type == 'taxonomy_term') {
$this->oid = $object
->get_value();
$this
->add_object('taxonomy_vocabulary', $object
->get_object()->vid);
}
return parent::set_object($object);
}
/**
* Trigger node event
*/
public function trigger() {
$term = $this
->get_object('taxnomy_term');
if ($result = parent::trigger()) {
watchdog('action', 'Triggered notifications for new taxonomy term @name..', array(
'@name' => $term->name,
));
}
return $result;
}
}
Members
Name![]() |
Modifiers | Type | Description | Overrides |
---|---|---|---|---|
Notifications_Taxonomy_Term_Create_Event:: |
public | function | Set main object id and vocabulary id when term is added | |
Notifications_Taxonomy_Term_Create_Event:: |
public | function | Trigger node event |