public function DisplayManager::addDisplayableItem in Examples for Developers 3.x
Same name and namespace in other branches
- 8 phpunit_example/src/DisplayManager.php \Drupal\phpunit_example\DisplayManager::addDisplayableItem()
Add a displayable item.
Parameters
DisplayInfoInterface $item: The item to add.
File
- modules/
phpunit_example/ src/ DisplayManager.php, line 33
Class
- DisplayManager
- An example class to demonstrate unit testing.
Namespace
Drupal\phpunit_exampleCode
public function addDisplayableItem(DisplayInfoInterface $item) {
$this->items[$item
->getDisplayName()] = $item;
}