You are here

public function SalesforceMappingController::editTitle in Salesforce Suite 8.4

Same name and namespace in other branches
  1. 5.0.x modules/salesforce_mapping_ui/src/Controller/SalesforceMappingController.php \Drupal\salesforce_mapping_ui\Controller\SalesforceMappingController::editTitle()

Provides a callback for a mapping edit page Title.

Parameters

\Drupal\Core\Routing\RouteMatchInterface $route_match: The route match.

\Drupal\Core\Entity\EntityInterface $_entity: (optional) An entity, passed in directly from the request attributes.

Return value

string|null The title for the mapping edit page, if an entity was found.

Overrides EntityController::editTitle

1 string reference to 'SalesforceMappingController::editTitle'
salesforce_mapping_ui.routing.yml in modules/salesforce_mapping_ui/salesforce_mapping_ui.routing.yml
modules/salesforce_mapping_ui/salesforce_mapping_ui.routing.yml

File

modules/salesforce_mapping_ui/src/Controller/SalesforceMappingController.php, line 25

Class

SalesforceMappingController
For now, just some dynamic route names.

Namespace

Drupal\salesforce_mapping_ui\Controller

Code

public function editTitle(RouteMatchInterface $route_match, EntityInterface $_entity = NULL) {
  if ($entity = $this
    ->doGetEntity($route_match, $_entity)) {
    return $this
      ->t("%label Mapping Settings", [
      '%label' => $entity
        ->label(),
    ]);
  }
  return $this
    ->t('New Mapping');
}