Deletes the specific information of an environment
@return \Zend\View\Model\JsonModel
199993
public function deleteSiteByIdAction()
    {
        $translator = $this->getServiceLocator()->get('translator');
        $request = $this->getRequest();
        $domainId = null;
        $success = 0;
        $textTitle = 'tr_meliscms_tool_site';
        $textMessage = '';
        
        $eventDatas = array();
        $this->getEventManager()->trigger('meliscms_site_delete_by_id_start', $this, $eventDatas);
        
        if($request->isPost()) {

            $domainTable = $this->getServiceLocator()->get('MelisEngineTableSiteDomain');
            $site404Table = $this->getServiceLocator()->get('MelisEngineTableSite404');
            
            $siteID = (int) $request->getPost('siteid');
            $siteEnv = $request->getPost('env');
            $site404PageId = $request->getPost('site404Page');
            
            $domainData = $domainTable->getDataBySiteIdAndEnv($siteID,$siteEnv);
            $domainData = $domainData->current();
            
            if($domainData)
            {
                $domainId = $domainData->sdom_id;
                
                $domainTable->deleteByField('sdom_id', $domainId);
                
                $success = 1;
                $textMessage = 'tr_meliscms_tool_site_delete_env_success';
            }
            else
            {
                $textMessage = 'tr_meliscms_tool_site_delete_env_failed';
            }
        }
        
        $response = array(
            'success' => $success,
            'textTitle' => $textTitle,
            'textMessage' => $textMessage,
        );
        
        $this->getEventManager()->trigger('meliscms_site_delete_by_id_end', $this, array_merge($response, array('typeCode' => 'CMS_SITE_ENV_DELETE', 'itemId' => $domainId)));
        
        return new JsonModel($response);
    }
90933
public static function deleteMapping()
    {
        $instance = new static;

        $params = $instance->getBasicEsParams();

        return $instance->getElasticSearchClient()->indices()->deleteMapping($params);
    }
619487
public function delete()
    {
        $ret = $this->conn()->selectCollection($this->table_name)->remove($this->where);
        $this->sql = array('table'=> $this->table_name,'where'=>$this->where);

        $this->_clear_var();
        return $ret;
    }
58503
function clean(): Result {
    return $this->collectionBuilder()
      ->addTask($this->taskCleanDir('var'))
      ->addTask($this->taskDeleteDir(['build', 'doc/api', 'web']))
      ->run();
  }
620956
public function delete() {
        $query = new DeleteQuery($this->getTable());
        $query->whereConditionGroup($this->getWhereConditionGroup());
        return $this->connection->exec($query);
    }
176815
public function delete()
    {

        // Cleanup the corporation
        $this->alliance_history()->delete();
        $this->assets()->delete();
        $this->blueprints()->delete();
        $this->bookmarks()->delete();
        $this->bookmark_folders()->delete();
        $this->contacts()->delete();
        $this->contact_labels()->delete();
        $this->container_logs()->delete();
        $this->contracts()->delete();
        $this->pocos()->delete();
        $this->divisions()->delete();
        $this->facilities()->delete();
        $this->industry_jobs()->delete();

        // TODO: Mining delete

        $this->issued_medals()->delete();
        $this->killmails()->delete();
        $this->medals()->delete();
        $this->member_limit()->delete();
        $this->member_titles()->delete();
        $this->member_tracking()->delete();
        $this->members()->delete();
        $this->orders()->delete();
        $this->roles()->delete();
        $this->role_history()->delete();
        $this->shareholders()->delete();
        $this->standings()->delete();

        // TODO: Starbases & Structures

        $this->titles()->delete();
        $this->title_roles()->delete();
        $this->wallet_balances()->delete();
        $this->wallet_journal()->delete();
        $this->wallet_transactions()->delete();

        return parent::delete();
    }
431868
public function remove(){
        $query = Query::delete()
            ->from(static::$_name);
        
        $conditions = [];
        $bind = [];
        
        foreach(static::$_primary as $key){
            $conditions[] = $key . ' = ?';
            $bind[] = Type\Base::getTypeObject(static::$_columns[$key], $this[$key]);
        }
        
        $query->where(implode(' AND ', $conditions))
            ->bind($bind)
            ->setDbAdapter(static::$_dbAdapter)
            ->setConsistency(static::$_writeConsistency);
        
        return $query->querySync();
    }
1234390
public function delete() : Model
	{
		$builder = $this->queryBuilder();

		if (isset($this->softProperties[$this->key])) {
			$builder->where(
				$this->key, $this->softProperties[$this->key]
			);
		}

		$builder->delete($this->getAssociatedTable());

		return $this;
	}
442552
public function deleteAction(Request $request)
    {
        try {
            $manager = $this->get('ongr_settings.settings_manager');
            $manager->delete($request->get('name'));

            return new JsonResponse(['error' => false]);
        } catch (\Exception $e) {
            return new JsonResponse(
                [
                    'error' => true,
                    'message' => 'Error occurred please try to delete setting again.'
                ]
            );
        }
    }
328418
public function deleteList()
    {
        $process = $this->params()->fromQuery('process');
        $levels = $this->params()->fromQuery('levels');
        $nbDeleted = 0;
        
        if (! empty($process) && ! empty($levels)) {
            
            $process = explode(',', $process);
            $process = array_map(function ($proces)
            {
                $parts = array_merge(explode('-', $proces), array(
                    null,
                    null,
                    null
                ));
                return array(
                    'mode' => $parts[0],
                    'type' => $parts[1],
                    'endpoint' => $parts[2]
                );
            }, $process);
            $levels = explode(',', $levels);
            $nbDeleted = $this->getAlertDataHandler()->removeAllAlerts($process, $levels);
        }
        
        $deleted = array(
            "deleted" => $nbDeleted
        );
        $response = $this->getResponse();
        $response->getHeaders()->addHeaderLine('Content-Type', 'application/json');
        $serializer = $this->getSerializer();
        $alertssJson = $serializer->serialize($deleted, 'json');
        $response->setContent($alertssJson);
        return $response;
    }
943242
public function jsonSerialize()
	{
		// Remove attributes not defined and not required (null)
		$fixedAttributes = $this->getFixedAttributes();
		foreach ($fixedAttributes as $k => $v) {
			if (!in_array($k, $this->requiredAttributes) && is_null($v)) {
				unset($fixedAttributes[$k]);
			}
		}

		// Add "x-" before each key of specification extensions
		$prefixedSpecificationExtensions = [];
		foreach ($this->specificationExtensions as $k => $v) {
			$prefixedSpecificationExtensions['x-' . $k] = $v;
		}

		return array_merge($fixedAttributes, $prefixedSpecificationExtensions);
	}
1096316
public function delete() {
		if($r = \Asgard\File\FileSystem::delete($this->src)) {
			$this->src = null;
			$this->name = null;
		}
		return $r;
	}
737894
public function delete()
    {
        $memoryTableAnnotation = ModelManager::getAnnotation($this, MemoryTable::class);
        if(null === $memoryTableAnnotation)
        {
            return null;
        }
        MemoryTableManager::del($memoryTableAnnotation->name, $this->__key);
    }
93123
public function clear() {
		$this->_value = null;
		$this->getConnection()->getClient()->delete($this->name);
		return $this;
	}
230609
public function trashAction()
    {
        /** @var AbstractAdmin $admin */
        $admin = $this->getAdmin();

        $admin->checkAccess('undelete');

        /** @var EntityManager $em */
        $em = $this->get('doctrine')->getManager();

        $filters = $em->getFilters();

        if ($filters->isEnabled('softdeleteable')) {
            $filters->disable('softdeleteable');
        }

        if (!$filters->isEnabled('softdeleteabletrash')) {
            $filters->enable('softdeleteabletrash');
        }

        /** @var SoftDeleteableTrashFilter $softdeleteabletrash */
        $softdeleteabletrash = $filters->getFilter('softdeleteabletrash');

        $softdeleteabletrash->enableForEntity($admin->getClass());

        $datagrid = $admin->getDatagrid();
        $formView = $datagrid->getForm()->createView();

        // set the theme for the current Admin Form
        $this->get('twig')->getExtension(FormExtension::class)->renderer->setTheme($formView, $admin->getFilterTheme());

        return $this->renderWithExtraParams('@CompoSonataAdmin/CRUD/trash.html.twig', [
            'action' => 'trash',
            'form' => $formView,
            'datagrid' => $datagrid,
            'csrf_token' => $this->getCsrfToken('sonata.batch'),
        ]);
    }
622202
public function delete()
    {
        $this->eventsManager->fireEvent('model:beforeDelete', $this);

        static::query(null, $this)->where($this->_getPrimaryKeyValuePairs())->delete();

        $this->eventsManager->fireEvent('model:afterDelete', $this);

        return $this;
    }
242903
public function discard()
    {
        if ($this->isNew()) {
            $app = Facade::getFacadeApplication();
            $db = $app->make('database')->connection();
            // check for related version edits. This only gets applied when we edit global areas.
            $r = $db->executeQuery('select cRelationID, cvRelationID from CollectionVersionRelatedEdits where cID = ? and cvID = ?', array(
                $this->cID,
                $this->cvID,
            ));
            while ($row = $r->fetch()) {
                $cn = Page::getByID($row['cRelationID'], $row['cvRelationID']);
                $cnp = new Permissions($cn);
                if ($cnp->canApprovePageVersions()) {
                    $v = $cn->getVersionObject();
                    $v->delete();
                    $db->executeQuery('delete from CollectionVersionRelatedEdits where cID = ? and cvID = ? and cRelationID = ? and cvRelationID = ?', array(
                        $this->cID,
                        $this->cvID,
                        $row['cRelationID'],
                        $row['cvRelationID'],
                    ));
                }
            }
            $this->delete();
        }
        $this->refreshCache();
    }