public function RulesEventHandlerEntityBundle::validate in Rules 7.2
Implements RulesEventHandlerInterface::validate().
Overrides RulesEventHandlerBase::validate
File
- includes/
rules.event.inc, line 378 - Contains event handler interface and base classes.
Class
- RulesEventHandlerEntityBundle
- Exposes the bundle of an entity as event setting.
Code
public function validate() {
if ($this->settings['bundle'] && empty($this->entityInfo['bundles'][$this->settings['bundle']])) {
throw new RulesIntegrityException(t('The @bundle %bundle of %entity_type is not known.', array(
'%bundle' => $this->settings['bundle'],
'%entity_type' => $this->entityInfo['label'],
'@bundle' => $this
->getBundlePropertyLabel(),
)), array(
NULL,
'bundle',
));
}
}