public static function removeNamespacesFromFields(array $data, $elementID)
    {
        $output = [];
        $template = sprintf(EditFormFactory::FIELD_NAMESPACE_TEMPLATE, $elementID, '');
        foreach ($data as $key => $value) {
            // Only look at fields that match the namespace template
            if (substr($key, 0, strlen($template)) !== $template) {
                continue;
            }

            $fieldName = substr($key, strlen($template));
            $output[$fieldName] = $value;
        }
        return $output;
    }
public static function removeNamespacesFromFields(array $data, $elementID)
    {
        $output = [];
        $template = sprintf(EditFormFactory::FIELD_NAMESPACE_TEMPLATE, $elementID, '');
        foreach ($data as $key => $value) {
            // Only look at fields that match the namespace template
            if (substr($key, 0, strlen($template)) !== $template) {
                continue;
            }

            $fieldName = substr($key, strlen($template));
            $output[$fieldName] = $value;
        }
        return $output;
    }
public static function removeNamespacesFromFields ( array $ data , $ elementID ) { $ output = [ ] ; $ template = sprintf ( EditFormFactory :: FIELD_NAMESPACE_TEMPLATE , $ elementID , '' ) ; foreach ( $ data as $ key => $ value ) { // Only look at fields that match the namespace template if ( substr ( $ key , 0 , strlen ( $ template ) ) !== $ template ) { continue ; } $ fieldName = substr ( $ key , strlen ( $ template ) ) ; $ output [ $ fieldName ] = $ value ; } return $ output ; }
Remove the pseudo namespaces that were added to form fields by the form factory

@param array $data
@param int $elementID
@return array
Remove the pseudo namespaces that were added to form fields by the form factory