DataTypeHook: also add getSetting helper method
This commit is contained in:
parent
d7da41b789
commit
f23c074143
|
@ -40,4 +40,13 @@ abstract class DataTypeHook
|
|||
$this->settings = $settings;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getSetting($name, $default = null)
|
||||
{
|
||||
if (array_key_exists($name, $this->settings)) {
|
||||
return $this->settings[$name];
|
||||
} else {
|
||||
return $default;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue