You are here

public function YamlFormRequest::getRouteName in YAML Form 8

Get the route name for a form/submission and source entity.

Parameters

\Drupal\Core\Entity\EntityInterface $yamlform_entity: A form or form submission.

\Drupal\Core\Entity\EntityInterface|null $source_entity: A form submission's source entity.

string $route_name: The route name.

Return value

string A route name prefixed with 'entity.{entity_type_id}' or just 'entity'.

Overrides YamlFormRequestInterface::getRouteName

File

src/YamlFormRequest.php, line 127

Class

YamlFormRequest
Handles form requests.

Namespace

Drupal\yamlform

Code

public function getRouteName(EntityInterface $yamlform_entity, EntityInterface $source_entity = NULL, $route_name) {
  return $this
    ->getBaseRouteName($yamlform_entity, $source_entity) . '.' . $route_name;
}