public function DisplayManager::item in Examples for Developers 8
Same name and namespace in other branches
- 3.x modules/phpunit_example/src/DisplayManager.php \Drupal\phpunit_example\DisplayManager::item()
Find an item by its name.
Parameters
string $name: The name to find.
Return value
DisplayInfoInterface|null The found item, or NULL if none is found.
File
- phpunit_example/
src/ DisplayManager.php, line 66
Class
- DisplayManager
- An example class to demonstrate unit testing.
Namespace
Drupal\phpunit_exampleCode
public function item($name) {
if (isset($this->items[$name])) {
return $this->items[$name];
}
return NULL;
}