You are here

public function SetterInjection::greet in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/system/tests/modules/new_dependency_test/src/SetterInjection.php \Drupal\new_dependency_test\SetterInjection::greet()
  2. 9 core/modules/system/tests/modules/new_dependency_test/src/SetterInjection.php \Drupal\new_dependency_test\SetterInjection::greet()

Get the simple greeting from the service.

Return value

string The greeting.

File

core/modules/system/tests/modules/new_dependency_test/src/SetterInjection.php, line 35

Class

SetterInjection
Generic service which uses setter injection.

Namespace

Drupal\new_dependency_test

Code

public function greet() {
  return $this->service
    ->greet();
}