public function ClassResolver::getInstanceFromDefinition in Layout Builder Symmetric Translations 8
Returns a class instance with a given class definition.
In contrast to controllers you don't specify a method.
Parameters
string $definition: A class name or service name.
Return value
object The instance of the class.
Throws
\InvalidArgumentException If $class is not a valid service identifier and the class does not exist.
Overrides ClassResolver::getInstanceFromDefinition
File
- src/
DependencyInjection/ ClassResolver.php, line 14
Class
- ClassResolver
- ClassResolver to load the extended InlineBlockEntityOperations class.
Namespace
Drupal\layout_builder_st\DependencyInjectionCode
public function getInstanceFromDefinition($definition) {
if ($definition === CoreInlineBlockEntityOperations::class) {
$definition = InlineBlockEntityOperations::class;
}
return parent::getInstanceFromDefinition($definition);
}