Deletes the language with $id.

@param int $id
11098
public function deleteLanguage($id)
    {
        try {
            return $this->innerGateway->deleteLanguage($id);
        } catch (DBALException $e) {
            throw new RuntimeException('Database error', 0, $e);
        } catch (PDOException $e) {
            throw new RuntimeException('Database error', 0, $e);
        }
    }
637853
public function removeBindings($id)
    {
        if ($this->hasDefinition($id)) {
            foreach ($this->getDefinition($id)->getBindings() as $key => $binding) {
                list(, $bindingId) = $binding->getValues();
                $this->removedBindingIds[(int) $bindingId] = true;
            }
        }
    }
88110
public static function remove($id)
    {
        $asset = self::find($id)->first();
        $media = $asset->media;

        foreach ($media as $file) {
            if (! is_file(public_path($file->getUrl())) || ! is_writable(public_path($file->getUrl()))) {
                return;
            }
        }

        $asset->delete();
    }
390480
public function delete($lang, $id)
    {
        if(!User::hasAccess('Language', 'delete')) {
            return $this->noPermission();
        }
        $language = Language::find($id);

        if($language) {
            if ($language->isDefault) {
                return $this->response("You can't delete the default language!", 403);
            }

            if($language->delete()) {
                // create virutal column for slug of every post type in the created language
                $allPostTypes = PostType::all();
                foreach ($allPostTypes as $postType){
                    AccioQuery::deleteColumn($postType->slug, "slug_".$language->slug);
                }

                $this->deleteDirectory($language->slug);
                return $this->response('The Language was deleted');
            }
        }

        return $this->response('The Language was not deleted. Please try again later', 500);
    }
461602
public function delete( $id ) {
		$this->cacheDeletes++;
		$this->cache->delete( $id );
		unset( $this->inMemoryCache[ $id ] );
	}
965034
public function delete($id)
    {
        $group = $this->findById($id);
        $old = $group;
        $group->delete();
        $this->event->fire('groups.delete', array($old));
    }
887177
public function change($id = null)
    {
        if ($id === null || !$this->Languages->exists(['id' => $id])) {
            $this->Flash->error($this->invalidRequestMessage);
            $this->redirect($this->referer());
            return;
        }
        $this->request->session()->write('contentLanguageId', (int)$id);
        $this->redirect($this->referer());
    }
699068
public function delete($id)
    {
        if (!$this->request->is('post')) {
            throw new MethodNotAllowedException();
        }

        /** @var Language $language */
        $language = $this->Languages->get($id);
        if ($this->Languages->delete($language)) {
            $this->Flash->success(__d('wasabi_core', 'The language <strong>{0}</strong> has been deleted.', $language->name));
        } else {
            $this->Flash->error($this->dbErrorMessage);
        }
        $this->redirect(['action' => 'index']);
        //@codingStandardIgnoreStart
        return;
        //@codingStandardIgnoreEnd
    }
160577
public function offsetUnset($id)
    {
        unset($this->values[$id]);
        unset($this->definitions[$id]);
        unset($this->aliases[$id]);
    }
147401
public function delete(string $id)
    {
        $this->request->allowMethod('delete');

        $entity = $this->SavedSearches->find()
            ->enableHydration(true)
            ->where(['id' => $id])
            ->first();

        $success = false;
        if (null !== $entity) {
            Assert::isInstanceOf($entity, EntityInterface::class);
            $success = $this->SavedSearches->delete($entity);
        }

        $this->set('success', $success);
        $success ?
            $this->set('data', []) :
            $this->set('error', 'The saved search could not be deleted. Please, try again.');
        $this->set('_serialize', ['success', 'data', 'error']);
    }
1285158
public function delete($id)
    {
        $this->loadModel('Taxonomy.Vocabularies');
        $vocabulary = $this->Vocabularies->get($id, [
            'conditions' => [
                'locked' => 0
            ]
        ]);

        if ($this->Vocabularies->delete($vocabulary)) {
            $this->Flash->success(__d('taxonomy', 'Vocabulary has been successfully deleted!'));
        } else {
            $this->Flash->danger(__d('taxonomy', 'Vocabulary could not be deleted, please try again'));
        }

        $this->title(__d('taxonomy', 'Delete Vocabulary'));
        $this->redirect($this->referer());
    }
840663
public function deleteAction($id)
    {
        $this->checkCsrf();

        $transUnit = $this->get('lexik_translation.translation_storage')->getTransUnitById($id);

        if (!$transUnit) {
            throw $this->createNotFoundException(sprintf('No TransUnit found for id "%s".', $id));
        }

        $deleted = $this->get('lexik_translation.trans_unit.manager')->delete($transUnit);

        return new JsonResponse(array('deleted' => $deleted), $deleted ? 200 : 400);
    }
314425
public function delete($id)
    {
        $entity = $this->get($id);

        $this->manager->remove($entity);
        $this->manager->flush();
    }
39980
public function delete($lang, $id)
    {
        if(!User::hasAccess('Categories', 'delete')) {
            return $this->noPermission();
        }

        $categoryDeleteRes = $this->deleteCategory($id);
        if(gettype($categoryDeleteRes) == "boolean") {
            if($categoryDeleteRes) {
                return $this->response('Category could not be deleted.', 500);
            }
        }else{
            return $categoryDeleteRes;
        }

        return $this->response('Category could not be deleted. Please try again later or contact your Administrator!', 500);
    }
402544
protected function _delete( $id ) {
		global $wpdb;

		$session_id = $this->sanitize( $id );

		$wpdb->delete( "{$wpdb->prefix}sm_sessions", [ 'session_key' => $session_id ] );
	}
1224810
public function deleteById($id)
    {
        try {
            $obj = $this->getById($id);
            $this->delete($obj);
            return true;
        } catch (\Exception $e) {
            throw $e;
        }
    }
907289
public static function remove($id)
    {
        if (isset(self::$list[$id])) {
            self::$list[$id]->free();
        }
    }