class RulesCommentAlterNodeEventHandler in Comment Alter 7
Event handler support comment alter node bundle event settings.
Hierarchy
- class \RulesEventHandlerBase implements RulesEventHandlerInterface
Expanded class hierarchy of RulesCommentAlterNodeEventHandler
1 string reference to 'RulesCommentAlterNodeEventHandler'
- comment_alter_rules_event_info in ./
comment_alter.rules.inc - Implements hook_rules_event_info().
File
- ./
comment_alter.rules.inc, line 51 - Rules related stuff.
View source
class RulesCommentAlterNodeEventHandler extends RulesEventHandlerEntityBundle {
/**
* Implements RulesEventHandlerInterface::__construct()
*/
public function __construct($event_name, $info) {
$this->eventName = $event_name;
$this->eventInfo = $info;
$this->settings = $this
->getDefaults();
// Cut off the suffix, e.g. remove 'view' from node_view.
$this->entityType = 'node';
$this->entityInfo = entity_get_info($this->entityType);
if (!$this->entityInfo) {
throw new InvalidArgumentException('Unsupported event name passed.');
}
}
/**
* Returns the label to use for the bundle property.
*
* @return string
*/
protected function getBundlePropertyLabel() {
return t('type');
}
}