You are here

public function ComponentSectionForm::title in Module Builder 8.3

Title callback.

See also

\Drupal\module_builder\Routing\ComponentRouteProvider

File

src/Form/ComponentSectionForm.php, line 46

Class

ComponentSectionForm
Generic form for entering a section of data for a component.

Namespace

Drupal\module_builder\Form

Code

public function title(Request $request, $entity_type, $op, $title) {

  // Get the entity request parameter. We can't use it as a function parameter
  // because we want this to work with any entity type.
  $entity = $request->attributes
    ->get($entity_type);
  return $this
    ->t($title, [
    '%label' => $entity
      ->label(),
  ]);
}