function Plugin::parse
Parses an annotation into its definition.
Parameters
array $values: The annotation array.
Return value
array The parsed annotation as a definition.
1 call to Plugin::parse()
- Plugin::__construct in core/lib/ Drupal/ Component/ Annotation/ Plugin.php 
- Constructs a Plugin object.
File
- 
              core/lib/ Drupal/ Component/ Annotation/ Plugin.php, line 54 
Class
- Plugin
- Defines a Plugin annotation object.
Namespace
Drupal\Component\AnnotationCode
protected function parse(array $values) {
  $definitions = [];
  foreach ($values as $key => $value) {
    if ($value instanceof AnnotationInterface) {
      $definitions[$key] = $value->get();
    }
    elseif (is_array($value)) {
      $definitions[$key] = $this->parse($value);
    }
    else {
      $definitions[$key] = $value;
    }
  }
  return $definitions;
}Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.
