You are here

class NewService in Drupal 8

Same name and namespace 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

Generic service returning a greeting.

Hierarchy

  • class \Drupal\new_dependency_test_with_service\NewService

Expanded class hierarchy of NewService

2 files declare their use of NewService
InjectedService.php in core/modules/system/tests/modules/new_dependency_test/src/InjectedService.php
SetterInjection.php in core/modules/system/tests/modules/new_dependency_test/src/SetterInjection.php
1 string reference to 'NewService'
new_dependency_test_with_service.services.yml in core/modules/system/tests/modules/new_dependency_test_with_service/new_dependency_test_with_service.services.yml
core/modules/system/tests/modules/new_dependency_test_with_service/new_dependency_test_with_service.services.yml
1 service uses NewService
new_dependency_test_with_service.service in core/modules/system/tests/modules/new_dependency_test_with_service/new_dependency_test_with_service.services.yml
Drupal\new_dependency_test_with_service\NewService

File

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

Namespace

Drupal\new_dependency_test_with_service
View source
class NewService {

  /**
   * Get a simple greeting.
   *
   * @return string
   *   The greeting provided by the new service.
   */
  public function greet() {
    return 'Hello';
  }

}

Members

Namesort descending Modifiers Type Description Overrides
NewService::greet public function Get a simple greeting.