Service.php
Same filename and directory in other branches
Namespace
Drupal\new_dependency_testFile
-
core/
modules/ system/ tests/ modules/ new_dependency_test/ src/ Service.php
View source
<?php
declare (strict_types=1);
namespace Drupal\new_dependency_test;
/**
* A service that can decorated itself.
*
* @see new_dependency_test.services.yml
*/
class Service {
/**
* Service constructor.
*
* @param \Drupal\new_dependency_test\Service|null $inner
* The service to decorate.
*/
public function __construct(protected ?Service $inner = NULL) {
}
/**
* Determines if the service is decorated.
*
* @return bool
* TRUE if the services is decorated, FALSE if not.
*/
public function isDecorated() {
return isset($this->inner);
}
}
Classes
| Title | Deprecated | Summary |
|---|---|---|
| Service | A service that can decorated itself. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.