You are here

public function FieldCollectionItemController::addPageTitle in Field collection 8

Same name and namespace in other branches
  1. 8.3 src/Controller/FieldCollectionItemController.php \Drupal\field_collection\Controller\FieldCollectionItemController::addPageTitle()

The _title_callback for the field_collection_item.add route.

Parameters

\Drupal\field_collection\Entity\FieldCollection $field_collection: The current field collection.

Return value

string The page title.

1 string reference to 'FieldCollectionItemController::addPageTitle'
field_collection.routing.yml in ./field_collection.routing.yml
field_collection.routing.yml

File

src/Controller/FieldCollectionItemController.php, line 105

Class

FieldCollectionItemController
Returns responses for Field collection item routes.

Namespace

Drupal\field_collection\Controller

Code

public function addPageTitle(FieldCollection $field_collection) {
  return $this
    ->t('Create @label', [
    '@label' => $field_collection
      ->label(),
  ]);
}