public function Type::node_type in Drupal 10
Same name and namespace in other branches
- 8 core/modules/node/src/Plugin/views/argument/Type.php \Drupal\node\Plugin\views\argument\Type::node_type()
- 9 core/modules/node/src/Plugin/views/argument/Type.php \Drupal\node\Plugin\views\argument\Type::node_type()
2 calls to Type::node_type()
- Type::summaryName in core/
modules/ node/ src/ Plugin/ views/ argument/ Type.php - Override the behavior of summaryName(). Get the user friendly version of the node type.
- Type::title in core/
modules/ node/ src/ Plugin/ views/ argument/ Type.php - Override the behavior of title(). Get the user friendly version of the node type.
File
- core/
modules/ node/ src/ Plugin/ views/ argument/ Type.php, line 70
Class
- Type
- Argument handler to accept a node type.
Namespace
Drupal\node\Plugin\views\argumentCode
public function node_type($type_name) {
$type = $this->nodeTypeStorage
->load($type_name);
$output = $type ? $type
->label() : $this
->t('Unknown content type');
return $output;
}