You are here

public function BundleConfigManager::setupBundleState in Title 8.2

Setup the state for a new bundle to match the rendering of core.

Parameters

$bundle: The bundle to setup.

File

src/BundleConfigManager.php, line 106

Class

BundleConfigManager
Allow management of the title module config.

Namespace

Drupal\title

Code

public function setupBundleState($bundle) {
  $this
    ->setTitleFieldFormatter($bundle, 'teaser', 'linked_and_wrapped', [
    'tag' => 'h2',
    'linked' => '1',
  ]);
  $this
    ->setTitleFieldFormatter($bundle, 'full', 'linked_and_wrapped', [
    'tag' => 'h1',
    'linked' => '0',
  ]);
  $this
    ->setTitleFieldFormatter($bundle, 'default', 'linked_and_wrapped', [
    'tag' => 'h1',
    'linked' => '0',
  ]);
}