Saves the favorites.<p>
544994
public void saveFavorites() {

        m_clipboard.saveFavorites();
        if (m_listPanel.getWidgetCount() < 1) {
            m_editButton.disable(Messages.get().key(Messages.GUI_TAB_FAVORITES_NO_ELEMENTS_0));
        }
        m_buttonEditingPanel.setVisible(false);
        m_buttonUsePanel.setVisible(true);
    }
1114375
protected void saveProperties(CmsPropertyChangeSet changes, AsyncCallback<Void> callback) {

        if (m_propertySaver != null) {
            m_propertySaver.saveProperties(changes, callback);
        } else {
            CmsCoreProvider.getVfsService().saveProperties(changes, callback);
        }
    }
346911
protected synchronized void save() {
        try {
            JSONArray jsonArray = new JSONArray();
            for (Job job : mQueue) {
                if (!(job instanceof InternalJob)) continue;
                InternalJob internalJob = (InternalJob) job;
                jsonArray.put(internalJob.toJSON());
            }

            SharedPreferences prefs = WonderPushConfiguration.getSharedPreferences();
            SharedPreferences.Editor editor = prefs.edit();
            editor.putString(getPrefName(), jsonArray.toString());
            editor.apply();
        } catch (JSONException e) {
            Log.e(TAG, "Could not save job queue", e);
        } catch (Exception e) {
            Log.e(TAG, "Could not save job queue", e);
        }
    }
997431
@Override
    public void save(Collection<T> items) {
        for (T item : items) {
            save(item);
        }
    }
197012
private void initializeList() {
		FavouritesCommService.getSearchFavourites(new DataCallback<List<SearchFavourite>>() {
			public void execute(List<SearchFavourite> result) {
				favouriteItems.getDataAsRecordList().removeList(favouriteItems.getRecords());
				for (SearchFavourite sf : result) {
					favouriteItems.addData(new FavouriteListRecord(sf));
				}
			}
		});
	}
149228
public static void save() {
        H.Response resp = H.Response.current();

        H.Session session = H.Session.current();
        serialize(session);

        H.Flash flash = H.Flash.current();
        serialize(flash);
    }
104316
public void saveSoundPreferences(final boolean flush) {
        if (Strings.isNotEmpty(musicPreferences)) {
            if (Strings.isNotEmpty(soundVolumePreferenceName)) {
                saveInPreferences(musicPreferences, soundVolumePreferenceName, soundVolume);
            }
            if (Strings.isNotEmpty(soundEnabledPreferenceName)) {
                saveInPreferences(musicPreferences, soundEnabledPreferenceName, soundEnabled);
            }
            if (flush) {
                flushPreferences();
            }
        }
    }
949514
private void save() {
		int resp = saveChooser.showSaveDialog(this);
		if (resp == JFileChooser.APPROVE_OPTION) {
			File out = saveChooser.getSelectedFile();
			
			ArrayList list = new ArrayList();
			for (int i=0;i<sprites.size();i++) {
				list.add(sprites.elementAt(i));
			}
			
			try {
				int b = ((Integer) border.getValue()).intValue();
				pack.packImages(list, twidth, theight, b, out);
			} catch (IOException e) {
				// shouldn't happen 
				e.printStackTrace();
				JOptionPane.showMessageDialog(this, "Failed to write output");
			}
		}
	}
272224
private static void save(final SharedPreferences pPrefs, final SharedPreferences.Editor pEdit,
                             final Map<String, String> pMap, final String pPrefix) {
        for (final String key : pPrefs.getAll().keySet()) {
            if (key.startsWith(pPrefix)) {
                pEdit.remove(key);
            }
        }
        for (final Map.Entry<String, String> entry : pMap.entrySet()) {
            final String key = pPrefix + entry.getKey();
            pEdit.putString(key, entry.getValue());
        }
    }
924929
boolean saveOptions() {

        //Enable history?
        boolean enabled = ((ComboBoxVersionsBean)m_numberVersions.getValue()).getValue() != CmsFileHistoryApp.NUMBER_VERSIONS_DISABLED;

        //Maximal count of versions for current resources.
        int versions = ((ComboBoxVersionsBean)m_numberVersions.getValue()).getValue();

        //Maximal count of versions for deleted resources.
        int versionsDeleted = versions;

        if (m_mode.getValue().equals(CmsFileHistoryApp.MODE_DISABLED)) {
            versionsDeleted = 0;
        }
        if (m_mode.getValue().equals(CmsFileHistoryApp.MODE_WITHOUTVERSIONS)) {
            versionsDeleted = 1;
        }

        if (m_mode.getValue().equals(CmsFileHistoryApp.MODE_WITHVERSIONS)
            && (versions == CmsFileHistoryApp.NUMBER_VERSIONS_DISABLED)) {
            return false;
        }
        OpenCms.getSystemInfo().setVersionHistorySettings(enabled, versions, versionsDeleted);
        OpenCms.writeConfiguration(CmsSystemConfiguration.class);

        return true;
    }
645227
void storeGalleryTypes(Collection<CmsGalleryType> galleryTypes) {

        m_galleryTypes.clear();
        for (CmsGalleryType type : galleryTypes) {
            m_galleryTypes.put(new Integer(type.getTypeId()), type);
        }
    }
290183
private void saveElementList(CmsObject cms, List<CmsContainerElementBean> elementList, String listKey)
    throws CmsException {

        // limit the favorite list size to avoid the additional info size limit
        if (elementList.size() > DEFAULT_ELEMENT_LIST_SIZE) {
            elementList = elementList.subList(0, DEFAULT_ELEMENT_LIST_SIZE);
        }

        JSONArray data = new JSONArray();

        Set<String> excludedSettings = new HashSet<String>();
        // do not store the template contexts, since dragging an element into the page which might be invisible
        // doesn't make sense
        excludedSettings.add(CmsTemplateContextInfo.SETTING);

        for (CmsContainerElementBean element : elementList) {
            data.put(elementToJson(element, excludedSettings));
        }
        CmsUser user = cms.getRequestContext().getCurrentUser();
        user.setAdditionalInfo(listKey, data.toString());
        cms.writeUser(user);
    }
1335158
public function savevariants()
    {
        $aParams = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter("editval");
        if (is_array($aParams)) {
            foreach ($aParams as $soxId => $aVarParams) {
                $this->savevariant($soxId, $aVarParams);
            }
        }

        $this->resetContentCache();
    }
582448
public function saveAll()
    {
        $this->init();

        $parameters = [];

        foreach ($this->configurations as $configuration) {
            $parameters = array_merge($parameters, $this->getConfigurationParameters($configuration));
        }

        $this->parameterRepository->save($parameters);
    }
176054
def toggle_favorite(request):
    
    if not request.is_ajax():
        return HttpResponseForbidden()

    try:
        app, model, pk = request.POST['app'], request.POST['model'], int(request.POST['pk'])

    except ValueError:
        return HttpResponseBadRequest()

    try:
        ctype = ContentType.objects.get(app_label=app, model=model)
        obj = ctype.get_object_for_this_type(id=pk)

    except Favorite.DoesNotExist:
        return HttpResponseNotFound()

    try:
        fave = Favorite.objects.get(content_type=ctype, object_id=obj.id, user=request.user)

    except Favorite.DoesNotExist:
        # Does not exist, so create it
        fave = Favorite(content_object=obj, user=request.user)
        fave.save()
        is_favorite = True

    else:
        # Exists, so delete it
        fave.delete()
        is_favorite = False

    # Return the current total number for UI updates
    favorites_count = Favorite.objects.filter(content_type=ctype, user=request.user).count()

    return JsonResponse({
        'app': app,
        'model': model,
        'pk': pk,
        'is_favorite': is_favorite,
        'count': favorites_count,
    })
633967
private void saveSettings() {
        mPinViewSettings = new PinViewSettings.Builder()
                .withColorSplit(mColorSplit)
                .withColorTextPinBox(mColorTextPinBoxes)
                .withColorTextTitles(mColorTextTitles)
                .withCustomDrawablePinBox(mCustomDrawablePinBox)
                .withDeleteOnClick(isDeleteOnClick())
                .withNativePinBox(isNativePinBox())
                .withSplit(getSplit())
                .withMaskPassword(isMaskPassword())
                .withKeyboardMandatory(isKeyboardMandatory())
                .withNumberCharacters(getNumberCharacters())
                .withSizeSplit(getSizeSplit())
                .withTextSizePinBox(getTextSizePinBoxes())
                .withTextSizeTitles(getTextSizeTitles())
                .withNumberPinBoxes(getNumberPinBoxes())
                .withPinTitles(getPinTitles())
                .build();
    }
542549
private void save() {

        if ((m_focalPoint != null) && isEditable()) {
            int x = (int)m_focalPoint.getX();
            int y = (int)m_focalPoint.getY();
            String val = "" + x + "," + y;
            CmsUUID sid = m_imageInfoProvider.get().getStructureId();
            List<CmsPropertyModification> propChanges = new ArrayList<>();
            propChanges.add(new CmsPropertyModification(sid, CmsGwtConstants.PROPERTY_IMAGE_FOCALPOINT, val, false));
            final CmsPropertyChangeSet changeSet = new CmsPropertyChangeSet(sid, propChanges);
            CmsRpcAction<Void> action = new CmsRpcAction<Void>() {

                @Override
                public void execute() {

                    CmsCoreProvider.getVfsService().saveProperties(changeSet, this);

                }

                @SuppressWarnings("synthetic-access")
                @Override
                protected void onResponse(Void result) {

                    m_savedFocalPoint = m_focalPoint;

                    if (m_pointWidget != null) {
                        m_pointWidget.setIsDefault(false);
                    }
                    m_imageInfoProvider.get().setFocalPoint(m_focalPoint);
                    if (m_nextAction != null) {
                        m_nextAction.run();
                    }

                }
            };
            action.execute();

        }
    }