/** * @return array */ public function resolveDependencies() { $dependencies = parent::resolveDependencies(); // check in fields if ($this->getClass() instanceof ClassDefinition) { foreach ($this->getClass()->getFieldDefinitions() as $field) { $key = $field->getName(); $dependencies = array_merge($dependencies, $field->resolveDependencies($this->{$key})); } } return $dependencies; }