You are here

public function ExcludeNodeTitleManager::getBundleExcludeMode in Exclude Node Title 8

Loads exclude mode for node type.

Parameters

mixed $param: Can be NodeTypeInterface object or machine name.

Return value

string Exclude mode.

Overrides ExcludeNodeTitleManagerInterface::getBundleExcludeMode

1 call to ExcludeNodeTitleManager::getBundleExcludeMode()
ExcludeNodeTitleManager::isTitleExcluded in src/ExcludeNodeTitleManager.php
Tells if node should get hidden or not.

File

src/ExcludeNodeTitleManager.php, line 66

Class

ExcludeNodeTitleManager
Service class for Exclude Node Title module settings management.

Namespace

Drupal\exclude_node_title

Code

public function getBundleExcludeMode($param) {
  if (is_object($param) && $param instanceof NodeTypeInterface) {
    $param = $param
      ->id();
  }
  $mode = $this->settingsConfig
    ->get('content_types.' . $param);
  return !empty($mode) ? $mode : 'none';
}