protected function setRecordViewButtons(\AbstractMetaDataParser $parser, $type, array $buttons)
    {
        foreach ($parser->_viewdefs['buttons'] as $key => $buttonsType) {
            if ($buttonsType['type'] === $type) {
                $keyDp = $key;
                break;
            }
        }

        $parser->_viewdefs['buttons'][$keyDp]['buttons'] = $buttons;
        $parser->handleSave(false);
    }