code: public function getResourceIdentifier(): ?ResourceIdentifierInterface
      {
          if (!$resourceId = $this->getResourceId()) {
              return null;
          }
  
          return ResourceIdentifier::create($this->getResourceType(), $resourceId);
      }
docs: Get the resource identifier for the route.
  
  @return ResourceIdentifierInterface|null
  @deprecated 2.0.0