public function AbstractSettingObject::__get in Fasttoggle 8.2
Retrieve the object type that can be modified by this setting.
Return value
string The machine name for the object type being modified by this setting.
1 method overrides AbstractSettingObject::__get()
- AbstractSettingGroup::__get in src/
Plugin/ SettingGroup/ AbstractSettingGroup.php - Retrieve the object type that can be modified by this setting.
File
- src/
Plugin/ SettingObject/ AbstractSettingObject.php, line 31 - Abstract Fasttoggle Object
Class
- AbstractSettingObject
- Abstract class for an object on which Fasttoggle can modify settings.
Namespace
Drupal\fasttoggle\Plugin\SettingObjectCode
public function __get($name) {
// Simple member
if (isset($this->{$name})) {
return $this->{$name};
}
// Annotation
$definition = $this
->getPluginDefinition();
if (isset($definition[$name])) {
return $definition[$name];
}
// Specific getter function
$functionName = "get_{$name}";
if (is_callable([
$this,
$functionName,
])) {
return $this
->{$functionName}();
}
// Unmatched
$trace = debug_backtrace();
trigger_error('Undefined property via __get(): ' . $name . ' in ' . $trace[0]['file'] . ' on line ' . $trace[0]['line'], E_USER_NOTICE);
return NULL;
}