You are here

public function DisplayManager::addDisplayableItem in Examples for Developers 8

Same name and namespace in other branches
  1. 3.x modules/phpunit_example/src/DisplayManager.php \Drupal\phpunit_example\DisplayManager::addDisplayableItem()

Add a displayable item.

Parameters

DisplayInfoInterface $item: The item to add.

File

phpunit_example/src/DisplayManager.php, line 33

Class

DisplayManager
An example class to demonstrate unit testing.

Namespace

Drupal\phpunit_example

Code

public function addDisplayableItem(DisplayInfoInterface $item) {
  $this->items[$item
    ->getDisplayName()] = $item;
}