function DisplayManager::item

Same name and namespace in other branches
  1. 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

modules/phpunit_example/src/DisplayManager.php, line 66

Class

DisplayManager
An example class to demonstrate unit testing.

Namespace

Drupal\phpunit_example

Code

public function item($name) {
    if (isset($this->items[$name])) {
        return $this->items[$name];
    }
    return NULL;
}