private function parseFieldRepeaters(array $fields, $key)
    {
        $blacklist = ['repeater', 'slug', 'templatefield'];
        $repeater = $fields[$key];

        if (!isset($repeater['fields']) || !is_array($repeater['fields'])) {
            return;
        }

        foreach ($repeater['fields'] as $repeaterKey => $repeaterField) {
            if (!isset($repeaterField['type']) || in_array($repeaterField['type'], $blacklist)) {
                unset($repeater['fields'][$repeaterKey]);
            }
        }

        return $repeater;
    }
private function parseFieldRepeaters(array $fields, $key)
    {
        $blacklist = ['repeater', 'slug', 'templatefield'];
        $repeater = $fields[$key];

        if (!isset($repeater['fields']) || !is_array($repeater['fields'])) {
            return;
        }

        foreach ($repeater['fields'] as $repeaterKey => $repeaterField) {
            if (!isset($repeaterField['type']) || in_array($repeaterField['type'], $blacklist)) {
                unset($repeater['fields'][$repeaterKey]);
            }
        }

        return $repeater;
    }
private function parseFieldRepeaters ( array $ fields , $ key ) { $ blacklist = [ 'repeater' , 'slug' , 'templatefield' ] ; $ repeater = $ fields [ $ key ] ; if ( ! isset ( $ repeater [ 'fields' ] ) || ! is_array ( $ repeater [ 'fields' ] ) ) { return ; } foreach ( $ repeater [ 'fields' ] as $ repeaterKey => $ repeaterField ) { if ( ! isset ( $ repeaterField [ 'type' ] ) || in_array ( $ repeaterField [ 'type' ] , $ blacklist ) ) { unset ( $ repeater [ 'fields' ] [ $ repeaterKey ] ) ; } } return $ repeater ; }
Basic validation of repeater fields.

@param array  $fields
@param string $key

@return array
Basic validation of repeater fields .