function RulesEventHandlerEntityBundle::validate
Implements RulesEventHandlerInterface::validate().
Overrides RulesEventHandlerBase::validate
File
-
includes/
rules.event.inc, line 378
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',
));
}
}