You are here

public function RulesEventHandlerEntityBundle::summary in Rules 7.2

Implements RulesEventHandlerInterface::summary().

Overrides RulesEventHandlerInterface::summary

File

includes/rules.event.inc, line 333
Contains event handler interface and base classes.

Class

RulesEventHandlerEntityBundle
Exposes the bundle of an entity as event setting.

Code

public function summary() {
  $bundle =& $this->settings['bundle'];
  $bundle_label = isset($this->entityInfo['bundles'][$bundle]['label']) ? $this->entityInfo['bundles'][$bundle]['label'] : $bundle;
  $suffix = isset($bundle) ? ' ' . t('of @bundle-key %name', array(
    '@bundle-key' => $this
      ->getBundlePropertyLabel(),
    '%name' => $bundle_label,
  )) : '';
  return check_plain($this->eventInfo['label']) . $suffix;
}