public function ExcludeNodeTitleManager::getExcludedViewModes in Exclude Node Title 8
Loads excluded view modes for node type.
Parameters
mixed $param: Can be NodeTypeInterface object or machine name.
Return value
array View modes.
Overrides ExcludeNodeTitleManagerInterface::getExcludedViewModes
1 call to ExcludeNodeTitleManager::getExcludedViewModes()
- ExcludeNodeTitleManager::isTitleExcluded in src/
ExcludeNodeTitleManager.php - Tells if node should get hidden or not.
File
- src/
ExcludeNodeTitleManager.php, line 79
Class
- ExcludeNodeTitleManager
- Service class for Exclude Node Title module settings management.
Namespace
Drupal\exclude_node_titleCode
public function getExcludedViewModes($param) {
if (is_object($param) && $param instanceof NodeTypeInterface) {
$param = $param
->id();
}
$modes = $this->settingsConfig
->get('content_type_modes.' . $param);
return !empty($modes) ? $modes : [];
}