Remove the specified setting from storage.

@param Settings $setting
@param Request  $request
@return Response
320484
public function destroy(Settings $setting, Request $request)
	{
		$this->deleteEntry($setting, $request);

		log_activity('Setting Deleted', 'A Setting was successfully deleted', $setting);

        return redirect_to_resource();
	}
1100610
public function bySetting($model, $setting)
    {
        $class = 'Stack\\Attribute';
        if (is_string($setting)) {
            $class .= '\\' . ucfirst($setting);
        } else if (is_array($setting) && isset($setting['attribute'])) {
            $class .= '\\' . ucfirst($setting['attribute']);
        }
        if (strtolower($class) != strtolower(get_class($this))) {
            return (new $class)->bySetting($model, $setting);
        }
        $this->initBySetting($model, $setting);
        return $this;
    }
833220
public function setFromRequest($settings)
    {
        $this->removeTokenKey($settings);

        foreach ($settings as $settingName => $settingValues) {
            $this->set($settingName, $settingValues);
        }
    }
517993
protected function manage(Request $request, SettingsOwnerInterface $owner = null)
    {
        $form = $this->createForm(SettingsType::class, $this->get('settings_manager')->all($owner));

        if ($request->isMethod('post')) {
            $form->handleRequest($request);

            if ($form->isValid()) {
                $this->get('settings_manager')->setMany($form->getData(), $owner);
                $this->get('session')->getFlashBag()->add(
                    'success',
                    $this->get('translator')->trans('settings_updated', array(), 'settings')
                );

                return $this->redirect($request->getUri());
            }
        }

        return $this->render(
            $this->container->getParameter('settings_manager.template'),
            array(
                'settings_form' => $form->createView(),
            )
        );
    }
956663
public function getSetting($setting)
    {
        return $this->db->select()
            ->from($this->getTable())
            ->where(array(
            'setting_key' => $setting
        ))
            ->get();
    }
1313286
public function destroy($id)
    {
     	$setting = Setting::findOrfail($id);
     	$setting->delete();
        return URL::to('setting');
    }
294490
public function setSettingsByRequest()
    {
        $allAllowedSettings = array_keys($this->allSettings()->toArray());

        return $this->settings()->set(request()->only($allAllowedSettings));
    }
180026
public function update($id,Request $request)
    {
        $setting = Setting::findOrfail($id);
    	
        $setting->name = $request->name;
        
        $setting->description = $request->description;
        
        
        $setting->save();

        return redirect('setting');
    }
522311
def delete_service_settings_on_scope_delete(sender, instance, **kwargs):
    
    for service_settings in ServiceSettings.objects.filter(scope=instance):
        service_settings.unlink_descendants()
        service_settings.delete()
661852
public function deleteByKey($request, $match){
        $model = $this->internalGet($request, $match);
        if (! isset($model)) {
            throw new Pluf_Exception_DoesNotExist('Setting not found');
        }
        $model->delete();
        return $model;
    }
1160208
public function edit(Setting $setting)
    {
        $this->module_name = (string) $setting->module_name;
        \Lang::addJsonPath(skin_path('lang' . DS . $this->module_name));

        return $this->makeResponse('edit', [
            'setting' => $setting,
            'modules' => $this->modules->all(),
            'field_types' => $this->field_types,
            'datalist' => (object) [
                'sections' => $this->model::getSections($this->module_name),
                'fieldsets' => $this->model::getFieldsets($this->module_name),
            ],
        ]);
    }
1214834
def remove_setting(self, section, name, save=False):
    '''
    '''
    configfile = get_configfile()
    return _remove_setting(section, name, configfile, save)
1202602
public function removeSessionAction(Request $request)
    {
        /** @var \Doctrine\Common\Persistence\ObjectManager $om */
        $om = $this->get($this->container->getParameter('ma27_api_key_authentication.object_manager'));

        if (!$header = (string) $request->headers->get($this->container->getParameter('ma27_api_key_authentication.key_header'))) {
            return new JsonResponse(['message' => 'Missing api key header!'], 400);
        }

        $user = $om
            ->getRepository($this->container->getParameter('ma27_api_key_authentication.model_name'))
            ->findOneBy([
                $this->getPropertyName(ClassMetadata::API_KEY_PROPERTY) => $header,
            ]);

        $this->get('ma27_api_key_authentication.auth_handler')->removeSession($user);

        return new JsonResponse([], 204);
    }
893143
public function reset(Request $request, System $systemBundle)
    {
        $systemBundle->persist();

        return $this->sendResponse($systemBundle, 'System setting has been reset successfully.');
    }
537270
public function remove_setting( $setting ) {
		if ( ! $this->is_setting( $setting ) ) {
			return true;
		}

		$priority = $this->_setting_priority[ $setting ];
		unset( $this->_settings[ $priority ][ $setting ] );
		unset( $this->_setting_priority[ $setting ] );
		if ( empty( $this->_settings[ $priority ] ) ) {
			unset( $this->_settings[ $priority ] );
		}
		foreach ( $this->_groups as $group_priority => $groups ) {
			foreach ( $groups as $group => $settings ) {
				$key = array_search( $setting, $settings );
				if ( false !== $key ) {
					unset( $this->_groups[ $group_priority ][ $group ][ $key ] );
					if ( empty( $this->_groups[ $group_priority ][ $group ] ) ) {
						unset( $this->_groups[ $group_priority ][ $group ] );
						unset( $this->_group_priority[ $group ] );
						if ( empty( $this->_groups[ $group_priority ] ) ) {
							unset( $this->_groups[ $group_priority ] );
						}
					}
					break;
				}
			}
		}

		return true;
	}
175152
public function terminate(Request $request, Response $response)
    {
        $this->settings->save();

        $unused = compact('request', 'response');
        unset($unused);
    }
430713
public function settings($settings = null)
    {
        if (is_null($settings)) {
            return $this->settings;
        }

        $this->settings = $settings;
        return $this;
    }