You are here

public function SalesforceMappingController::fieldsTitle in Salesforce Suite 5.0.x

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

Provides a callback for a mapping field config 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.

1 string reference to 'SalesforceMappingController::fieldsTitle'
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 45

Class

SalesforceMappingController
For now, just some dynamic route names.

Namespace

Drupal\salesforce_mapping_ui\Controller

Code

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