public function NodeType::summary in Zircon Profile 8.0
Same name and namespace in other branches
- 8 core/modules/node/src/Plugin/Condition/NodeType.php \Drupal\node\Plugin\Condition\NodeType::summary()
Provides a human readable summary of the condition's configuration.
Overrides ConditionInterface::summary
File
- core/
modules/ node/ src/ Plugin/ Condition/ NodeType.php, line 98 - Contains \Drupal\node\Plugin\Condition\NodeType.
Class
- NodeType
- Provides a 'Node Type' condition.
Namespace
Drupal\node\Plugin\ConditionCode
public function summary() {
if (count($this->configuration['bundles']) > 1) {
$bundles = $this->configuration['bundles'];
$last = array_pop($bundles);
$bundles = implode(', ', $bundles);
return $this
->t('The node bundle is @bundles or @last', array(
'@bundles' => $bundles,
'@last' => $last,
));
}
$bundle = reset($this->configuration['bundles']);
return $this
->t('The node bundle is @bundle', array(
'@bundle' => $bundle,
));
}