original_string: public function getDataModelDependency()
      {
          if (! $this->exists) {
              return null;
          }
  
          $dependency = new FieldDataDependency();
  
          foreach ($this->_fields as $key => $field) {
              if ($field instanceof FieldInterface) {
                  $dependsOn = $field->getDataModelDependsOn();
  
                  if ($field->hasDataModelDependencies()) {
                      $dependency->addField($field);
                  }
              }
          }
  
          if ($dependency->getFieldCount()) {
              return $dependency;
          } else {
              return null;
          }
      }
code: public function getDataModelDependency()
      {
          if (! $this->exists) {
              return null;
          }
  
          $dependency = new FieldDataDependency();
  
          foreach ($this->_fields as $key => $field) {
              if ($field instanceof FieldInterface) {
                  $dependsOn = $field->getDataModelDependsOn();
  
                  if ($field->hasDataModelDependencies()) {
                      $dependency->addField($field);
                  }
              }
          }
  
          if ($dependency->getFieldCount()) {
              return $dependency;
          } else {
              return null;
          }
      }
code_tokens: public function getDataModelDependency ( ) { if ( ! $ this -> exists ) { return null ; } $ dependency = new FieldDataDependency ( ) ; foreach ( $ this -> _fields as $ key => $ field ) { if ( $ field instanceof FieldInterface ) { $ dependsOn = $ field -> getDataModelDependsOn ( ) ; if ( $ field -> hasDataModelDependencies ( ) ) { $ dependency -> addField ( $ field ) ; } } } if ( $ dependency -> getFieldCount ( ) ) { return $ dependency ; } else { return null ; } }
docstring: Get model dependency that changes model settings for each row when loaded
  
  @return \MUtil\Model\Dependency\DependencyInterface or null
docstring_tokens: Get model dependency that changes model settings for each row when loaded