EntityController::addTitle

public EntityController::addTitle($entity_type_id)

Provides a generic add title callback for an entity type.

Parameters

string $entity_type_id: The entity type ID.

Return value

string The title for the entity add page.

File

core/lib/Drupal/Core/Entity/Controller/EntityController.php, line 181

Class

EntityController
Provides the add-page and title callbacks for entities.

Namespace

Drupal\Core\Entity\Controller

Code

1
2
3
4
public function addTitle($entity_type_id) {
  $entity_type = $this->entityTypeManager->getDefinition($entity_type_id);
  return $this->t('Add @entity-type', ['@entity-type' => $entity_type->getLowercaseLabel()]);
}
doc_Drupal
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.