public function RulesCommentAlterNodeEventHandler::__construct in Comment Alter 7
Implements RulesEventHandlerInterface::__construct()
Overrides RulesEventHandlerEntityBundle::__construct
File
- ./
comment_alter.rules.inc, line 56 - Rules related stuff.
Class
- RulesCommentAlterNodeEventHandler
- Event handler support comment alter node bundle event settings.
Code
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.');
}
}