function Type::node_type
Same name and namespace in other branches
- 8.9.x core/modules/node/src/Plugin/views/argument/Type.php \Drupal\node\Plugin\views\argument\Type::node_type()
- 10 core/modules/node/src/Plugin/views/argument/Type.php \Drupal\node\Plugin\views\argument\Type::node_type()
- 11.x 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 - Provides the name to use for the summary, defaults to the name field.
- Type::title in core/
modules/ node/ src/ Plugin/ views/ argument/ Type.php - Get the title this argument will assign the view, given the argument.
File
-
core/
modules/ node/ src/ Plugin/ views/ argument/ Type.php, line 68
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;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.