src/Service/MelisCoreConfigService.php
public function setFormFieldRequired($array, $fieldName, $isRequired = false)
    {
        if (!empty($array['input_filter'])) {
            foreach ($array['input_filter'] as $keyElement => $element) {
                if ($keyElement == $fieldName) {
                    $array['input_filter'][$keyElement]['required'] = $isRequired;
                }
            }
        }

        return $array;
    }
public function setFormFieldRequired($array, $fieldName, $isRequired = false)
    {
        if (!empty($array['input_filter'])) {
            foreach ($array['input_filter'] as $keyElement => $element) {
                if ($keyElement == $fieldName) {
                    $array['input_filter'][$keyElement]['required'] = $isRequired;
                }
            }
        }

        return $array;
    }
public function setFormFieldRequired ( $ array , $ fieldName , $ isRequired = false ) { if ( ! empty ( $ array [ 'input_filter' ] ) ) { foreach ( $ array [ 'input_filter' ] as $ keyElement => $ element ) { if ( $ keyElement == $ fieldName ) { $ array [ 'input_filter' ] [ $ keyElement ] [ 'required' ] = $ isRequired ; } } } return $ array ; }
Set a required field in input filters from the the config form array

@param array $array
@param string $fieldName
@param boolean $isRequired

@return array
Set a required field in input filters from the the config form array