protected function addErrorToProperty(string $property, string $key, string $extensionName) {
    $errorMessage = LocalizationUtility::translate($key, $extensionName);
    $error        = $this->objectManager->get(Error::class, $errorMessage, time());

    $this->result->forProperty($property)->addError($error);
  }
protected function addErrorToProperty(string $property, string $key, string $extensionName) {
    $errorMessage = LocalizationUtility::translate($key, $extensionName);
    $error        = $this->objectManager->get(Error::class, $errorMessage, time());

    $this->result->forProperty($property)->addError($error);
  }
protected function addErrorToProperty ( string $ property , string $ key , string $ extensionName ) { $ errorMessage = LocalizationUtility :: translate ( $ key , $ extensionName ) ; $ error = $ this -> objectManager -> get ( Error :: class , $ errorMessage , time ( ) ) ; $ this -> result -> forProperty ( $ property ) -> addError ( $ error ) ; }
Adds an error to a property.

@param string $property The property
@param string $key The key to reference the error
@param string $extensionName The extension name
Adds an error to a property .