Browse Source

SettingSolver : getDefaultValue

develop
Guillaume 3 years ago
parent
commit
b84792194d
1 changed files with 16 additions and 0 deletions
  1. +16
    -0
      Solver/Setting/SettingSolver.php

+ 16
- 0
Solver/Setting/SettingSolver.php View File

@@ -44,4 +44,20 @@ class SettingSolver

return null;
}

public function getDefaultValue(EntityInterface $entity, $settingDefault)
{
$valueDefault = null;

if(is_array($settingDefault)) {
if(isset($settingDefault[$entity->getDevAlias()])) {
$valueDefault = $settingDefault[$entity->getDevAlias()];
}
}
else {
$valueDefault = $settingDefault;
}

return $valueDefault;
}
}

Loading…
Cancel
Save