-
Notifications
You must be signed in to change notification settings - Fork 1
Added recursivity for configuring moreoption by entity #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: Romain B. <[email protected]>
Co-authored-by: Romain B. <[email protected]>
Waiting #1 |
Co-authored-by: Romain B. <[email protected]>
src/Config.php
Outdated
/** | ||
* Get effective configuration for current entity, considering parent entity inheritance | ||
*/ | ||
public static function getEffectiveConfig(): self |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are 3 similar functions: getCurrentConfig()
(used only in tests), getEffectiveConfig()
, and getEffectiveConfigForEntity()
. One should be enough.
function getConfig(?int $entity_id = null): self
{
if ($entity_id === null) {
$entity_id = Session::getActiveEntity();
}
src/Config.php
Outdated
/** | ||
* Get effective configuration for current entity, considering parent entity inheritance | ||
*/ | ||
public static function getEffectiveConfig(): self |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should do as the core does with: Entity::getUsedConfig()
Where it is not the entire entity that inherits from its parent, but each parameter.
No description provided.