function NewService::greet

Same name in other branches
  1. 9 core/modules/system/tests/modules/new_dependency_test_with_service/src/NewService.php \Drupal\new_dependency_test_with_service\NewService::greet()
  2. 8.9.x core/modules/system/tests/modules/new_dependency_test_with_service/src/NewService.php \Drupal\new_dependency_test_with_service\NewService::greet()
  3. 10 core/modules/system/tests/modules/new_dependency_test_with_service/src/NewService.php \Drupal\new_dependency_test_with_service\NewService::greet()

Get a simple greeting.

Return value

string The greeting provided by the new service.

File

core/modules/system/tests/modules/new_dependency_test_with_service/src/NewService.php, line 18

Class

NewService
Generic service returning a greeting.

Namespace

Drupal\new_dependency_test_with_service

Code

public function greet() {
    return 'Hello';
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.