public function BehaviorSettingsManager::loadBehaviorSettingsAsEditableConfig in Rabbit Hole 2.x
Same name and namespace in other branches
- 8 src/BehaviorSettingsManager.php \Drupal\rabbit_hole\BehaviorSettingsManager::loadBehaviorSettingsAsEditableConfig()
Load behaviour settings for an entity or bundle, or return NULL.
Load editable rabbit hole behaviour settings appropriate to the given config or NULL if not available.
Parameters
string $entity_type_label: The entity type (e.g. node) as a string.
string $entity_id: The entity ID as a string.
Return value
\Drupal\Core\Config\ImmutableConfig|null The BehaviorSettings Config object or NULL if it does not exist.
Overrides BehaviorSettingsManagerInterface::loadBehaviorSettingsAsEditableConfig
File
- src/
BehaviorSettingsManager.php, line 70
Class
- BehaviorSettingsManager
- Provides operations for bundles configuration.
Namespace
Drupal\rabbit_holeCode
public function loadBehaviorSettingsAsEditableConfig($entity_type_id, $entity_id, $is_bundle = FALSE) {
$actual = $this->configFactory
->getEditable('rabbit_hole.behavior_settings.' . $this
->generateBehaviorSettingsFullId($entity_type_id, $entity_id));
return !$actual
->isNew() ? $actual : NULL;
}