src/Controller/PlatformSchemeController.php
private function formatErrorMessage($errors = array())
    {
        $melisMelisCoreConfig = $this->serviceLocator->get('MelisCoreConfig');
        $appConfigForm = $melisMelisCoreConfig->getItem('meliscore/forms/melis_core_platform_scheme_form');
        $appConfigForm = $appConfigForm['elements'];

        foreach ($errors as $keyError => $valueError) {
            foreach ($appConfigForm as $keyForm => $valueForm) {
                if ($valueForm['spec']['name'] == $keyError &&
                    !empty($valueForm['spec']['options']['label'])
                )
                    $errors[$keyError]['label'] = $valueForm['spec']['options']['label'];
            }
        }

        return $errors;
    }
private function formatErrorMessage($errors = array())
    {
        $melisMelisCoreConfig = $this->serviceLocator->get('MelisCoreConfig');
        $appConfigForm = $melisMelisCoreConfig->getItem('meliscore/forms/melis_core_platform_scheme_form');
        $appConfigForm = $appConfigForm['elements'];

        foreach ($errors as $keyError => $valueError) {
            foreach ($appConfigForm as $keyForm => $valueForm) {
                if ($valueForm['spec']['name'] == $keyError &&
                    !empty($valueForm['spec']['options']['label'])
                )
                    $errors[$keyError]['label'] = $valueForm['spec']['options']['label'];
            }
        }

        return $errors;
    }
private function formatErrorMessage ( $ errors = array ( ) ) { $ melisMelisCoreConfig = $ this -> serviceLocator -> get ( 'MelisCoreConfig' ) ; $ appConfigForm = $ melisMelisCoreConfig -> getItem ( 'meliscore/forms/melis_core_platform_scheme_form' ) ; $ appConfigForm = $ appConfigForm [ 'elements' ] ; foreach ( $ errors as $ keyError => $ valueError ) { foreach ( $ appConfigForm as $ keyForm => $ valueForm ) { if ( $ valueForm [ 'spec' ] [ 'name' ] == $ keyError && ! empty ( $ valueForm [ 'spec' ] [ 'options' ] [ 'label' ] ) ) $ errors [ $ keyError ] [ 'label' ] = $ valueForm [ 'spec' ] [ 'options' ] [ 'label' ] ; } } return $ errors ; }
Returns the a formatted error messages with its labels
@param array $errors
@return array
Returns the a formatted error messages with its labels