How do I inject services in a class that implements an interface.
class RoleNegotiator implements ThemeNegotiatorInterface {
public static function create(ContainerInterface $interface) {
return new static(
$interface->get('router.admin_context')
);
}
public function __construct(RouteMatchInterface $route) {
$this->route = $route;
}
}
The above code throws an error.