You are here

public function BehaviorForm::entityTypeBundleBehaviorsTitle in Synonyms 2.0.x

Title callback for 'behavior.entity_type.bundle'.

1 string reference to 'BehaviorForm::entityTypeBundleBehaviorsTitle'
synonyms.routing.yml in ./synonyms.routing.yml
synonyms.routing.yml

File

src/Form/BehaviorForm.php, line 216

Class

BehaviorForm
The behavior form for given entity type.

Namespace

Drupal\synonyms\Form

Code

public function entityTypeBundleBehaviorsTitle() {
  if ($this->entityType == $this->bundle) {
    return $this
      ->t('Manage behaviors of @entity_type', [
      '@entity_type' => $this
        ->getRequest()
        ->get('synonyms_entity_type')
        ->getLabel(),
    ]);
  }
  $bundle_info = $this->entityTypeBundleInfo
    ->getBundleInfo($this->entityType);
  return $this
    ->t('Manage behaviors of @entity_type @bundle', [
    '@entity_type' => $this
      ->getRequest()
      ->get('synonyms_entity_type')
      ->getLabel(),
    '@bundle' => $bundle_info[$this->bundle]['label'],
  ]);
}