public function PluginCallback::get in Express 8
Gets the value of an annotation.
Overrides PluginID::get
File
- themes/
contrib/ bootstrap/ src/ Annotation/ PluginCallback.php, line 57 - Contains \Drupal\bootstrap\Annotation\PluginCallback.
Class
- PluginCallback
- Defines a Plugin annotation object that just contains an ID.
Namespace
Drupal\bootstrap\AnnotationCode
public function get() {
$definition = parent::get();
$parent_properties = array_keys($definition);
$parent_properties[] = 'value';
// Merge in the defined properties.
$reflection = new \ReflectionClass($this);
foreach ($reflection
->getProperties(\ReflectionProperty::IS_PUBLIC) as $property) {
$name = $property
->getName();
if (in_array($name, $parent_properties)) {
continue;
}
$value = $property
->getValue($this);
if ($value instanceof AnnotationInterface) {
$value = $value
->get();
}
$definition[$name] = $value;
}
return $definition;
}