Removes category articles ordering set by saveneworder() method.

@return null
765663
public function remNewOrder()
    {
        $oCategory = oxNew(\OxidEsales\Eshop\Application\Model\Category::class);
        $sId = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter("oxid");
        if ($oCategory->load($sId)) {
            //Disable editing for derived items
            if ($oCategory->isDerived()) {
                return;
            }

            $oDb = \OxidEsales\Eshop\Core\DatabaseProvider::getDb();

            $sQuotedCategoryId = $oDb->quote($oCategory->getId());

            $sSqlShopFilter = $this->updateQueryFilterForResetCategoryArticlesOrder();
            $sSelect = "update oxobject2category set oxpos = '0' where oxobject2category.oxcatnid = {$sQuotedCategoryId} {$sSqlShopFilter}";
            $oDb->execute($sSelect);

            \OxidEsales\Eshop\Core\Registry::getSession()->setVariable('neworder_sess', null);

            $this->onCategoryChange($sId);
        }
    }
297171
protected function _clearBundles()
    {
        reset($this->_aBasketContents);
        foreach ($this->_aBasketContents as $sItemKey => $oBasketItem) {
            if ($oBasketItem->isBundle()) {
                $this->removeItem($sItemKey);
            }
        }
    }
1363251
public function clear()
    {
        $this->id = null;
        $this->locale = null;
        $this->description = null;
        $this->alreadyInSave = false;
        $this->clearAllReferences();
        $this->applyDefaultValues();
        $this->resetModified();
        $this->setNew(true);
        $this->setDeleted(false);
    }
221949
public function removeCategory(\Enhavo\Bundle\CategoryBundle\Entity\Category $category)
    {
        $category->setCollection(null);
        $this->categories->removeElement($category);
    }
1366312
public function clear()
    {
        parent::clear();

        $this->with = array();
        $this->primaryCriteria = null;
        $this->formatter = null;
        $this->select = null;
        $this->modelAlias = $this->originalModelAlias;
        $this->currentAlias = null;
        $this->setDbName($this->originalDbName);
        $this->useAliasInSQL = false;
        $this->isKeepQuery = true;
        $this->previousJoin = null;
        $this->isWithOneToMany = false;
        $this->replacedColumns = array();
        $this->foundMatch = false;

        return $this;
    }
76624
public function removeFromList()
    {
        // Keep the list modification query for the save() transaction
        $this->sortableQueries[] = array(
            'callable'  => array('\CustomerGroup\Model\CustomerGroupQuery', 'sortableShiftRank'),
            'arguments' => array(-1, $this->getPosition() + 1, null)
        );
        // remove the object from the list
        $this->setPosition(null);


        return $this;
    }
1134041
public function clear()
    {
        if (null !== $this->aSport) {
            $this->aSport->removeSkill($this);
        }
        if (null !== $this->aVariationOf) {
            $this->aVariationOf->removeVariation($this);
        }
        if (null !== $this->aMultipleOf) {
            $this->aMultipleOf->removeMultiple($this);
        }
        if (null !== $this->aObject) {
            $this->aObject->removeSkill($this);
        }
        if (null !== $this->aStartPosition) {
            $this->aStartPosition->removeSkillRelatedByStartPositionId($this);
        }
        if (null !== $this->aEndPosition) {
            $this->aEndPosition->removeSkillRelatedByEndPositionId($this);
        }
        if (null !== $this->aFeaturedPicture) {
            $this->aFeaturedPicture->removeFeaturedSkill($this);
        }
        if (null !== $this->aFeaturedVideo) {
            $this->aFeaturedVideo->removeFeaturedSkill($this);
        }
        if (null !== $this->aFeaturedTutorial) {
            $this->aFeaturedTutorial->removeFeaturedTutorialSkill($this);
        }
        if (null !== $this->aKstrukturRoot) {
            $this->aKstrukturRoot->removeRootSkill($this);
        }
        if (null !== $this->aFunctionPhaseRoot) {
            $this->aFunctionPhaseRoot->removeRootSkill($this);
        }
        $this->id = null;
        $this->sport_id = null;
        $this->name = null;
        $this->alternative_name = null;
        $this->slug = null;
        $this->description = null;
        $this->history = null;
        $this->is_translation = null;
        $this->is_rotation = null;
        $this->is_acyclic = null;
        $this->is_cyclic = null;
        $this->longitudinal_flags = null;
        $this->latitudinal_flags = null;
        $this->transversal_flags = null;
        $this->movement_description = null;
        $this->sequence_picture_url = null;
        $this->variation_of_id = null;
        $this->start_position_id = null;
        $this->end_position_id = null;
        $this->is_composite = null;
        $this->is_multiple = null;
        $this->multiple_of_id = null;
        $this->multiplier = null;
        $this->generation = null;
        $this->importance = null;
        $this->picture_id = null;
        $this->video_id = null;
        $this->tutorial_id = null;
        $this->kstruktur_id = null;
        $this->function_phase_id = null;
        $this->object_id = null;
        $this->version = null;
        $this->version_created_at = null;
        $this->version_comment = null;
        $this->alreadyInSave = false;
        $this->clearAllReferences();
        $this->applyDefaultValues();
        $this->resetModified();
        $this->setNew(true);
        $this->setDeleted(false);
    }
1196381
public void clearCategories() {

        List<String> selectedCategories = m_searchObject.getCategories();
        m_handler.onClearCategories(selectedCategories);
        m_searchObject.clearCategories();
        updateResultsTab(false);
        ValueChangeEvent.fire(this, m_searchObject);
    }
516360
public function ClearCacheOnAllAffectedArticles()
    {
        $iStartOperation = time();
        $aArticleRestrictions = $this->GetMLTIdList('shop_article_mlt');
        foreach ($aArticleRestrictions as $sArticelId) {
            TCacheManager::PerformeTableChange('shop_article', $sArticelId);
        }

        $aCategoryRestrictons = $this->GetMLTIdList('shop_category_mlt');
        $databaseConnection = $this->getDatabaseConnection();
        if (count($aCategoryRestrictons) > 0) {
            $quotedCategoryRestrictions = implode(',', array_map(array($databaseConnection, 'quote'), $aCategoryRestrictons));
            $query = "SELECT `shop_article`.`id`
                    FROM `shop_article`
               LEFT JOIN `shop_article_shop_category_mlt` ON `shop_article`.`id` = `shop_article_shop_category_mlt`.`source_id`
                   WHERE `shop_article`.`shop_category_id` IN ($quotedCategoryRestrictions)
                      OR `shop_article_shop_category_mlt`.`target_id` IN ($quotedCategoryRestrictions)
                GROUP BY `shop_article`.`id`
                 ";
            $tRes = MySqlLegacySupport::getInstance()->query($query);
            while ($aRes = MySqlLegacySupport::getInstance()->fetch_assoc($tRes)) {
                TCacheManager::PerformeTableChange('shop_article', $aRes['id']);
            }
        }

        if (0 === count($aArticleRestrictions) && 0 === count($aCategoryRestrictons)) {
            TCacheManager::PerformeTableChange('shop_article', null);
        }

        $databaseConnection->update($this->table, array(
            'cache_clear_last_executed' => date('Y-m-d H:i:s', $iStartOperation),
        ), array(
            'id' => $this->id,
        ));
    }
346591
protected function removeCategoryArticles($articles, $categoryID)
    {
        $db = \OxidEsales\Eshop\Core\DatabaseProvider::getDb();
        $prodIds = implode(", ", \OxidEsales\Eshop\Core\DatabaseProvider::getDb()->quoteArray($articles));

        $delete = "delete from oxobject2category ";
        $where = $this->getRemoveCategoryArticlesQueryFilter($categoryID, $prodIds);


        $sQ = $delete . $where;
        $db->execute($sQ);

        // updating oxtime values
        $this->_updateOxTime($prodIds);
    }
901162
public function removeCat()
    {
        $categoriesToRemove = $this->_getActionIds('oxcategories.oxid');

        $oxId = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('oxid');
        $dataBase = \OxidEsales\Eshop\Core\DatabaseProvider::getDb();

        // adding
        if (\OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('all')) {
            $categoriesTable = $this->_getViewName('oxcategories');
            $categoriesToRemove = $this->_getAll($this->_addFilter("select {$categoriesTable}.oxid " . $this->_getQuery()));
        }

        // removing all
        if (is_array($categoriesToRemove) && count($categoriesToRemove)) {
            $query = "delete from oxobject2category where oxobject2category.oxobjectid= "
                  . \OxidEsales\Eshop\Core\DatabaseProvider::getDb()->quote($oxId) . " and ";
            $query = $this->updateQueryForRemovingArticleFromCategory($query);
            $query .= " oxcatnid in (" . implode(', ', \OxidEsales\Eshop\Core\DatabaseProvider::getDb()->quoteArray($categoriesToRemove)) . ')';
            $dataBase->Execute($query);

            // updating oxtime values
            $this->_updateOxTime($oxId);
        }

        $this->resetArtSeoUrl($oxId, $categoriesToRemove);
        $this->resetContentCache();

        $this->onCategoriesRemoval($categoriesToRemove, $oxId);
    }
717687
public function saveNewOrder()
    {
        $oCategory = oxNew(\OxidEsales\Eshop\Application\Model\Category::class);
        $sId = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter("oxid");
        if ($oCategory->load($sId)) {
            //Disable editing for derived items
            if ($oCategory->isDerived()) {
                return;
            }

            $this->resetContentCache();

            $aNewOrder = \OxidEsales\Eshop\Core\Registry::getSession()->getVariable("neworder_sess");
            if (is_array($aNewOrder) && count($aNewOrder)) {
                $sO2CView = $this->_getViewName('oxobject2category');
                $sSelect = "select * from $sO2CView where $sO2CView.oxcatnid='" . $oCategory->getId() . "' and $sO2CView.oxobjectid in (" . implode(", ", \OxidEsales\Eshop\Core\DatabaseProvider::getDb()->quoteArray($aNewOrder)) . " )";
                $oList = oxNew(\OxidEsales\Eshop\Core\Model\ListModel::class);
                $oList->init("oxbase", "oxobject2category");
                $oList->selectString($sSelect);

                // setting new position
                foreach ($oList as $oObj) {
                    if (($iNewPos = array_search($oObj->oxobject2category__oxobjectid->value, $aNewOrder)) !== false) {
                        $oObj->oxobject2category__oxpos->setValue($iNewPos);
                        $oObj->save();
                    }
                }

                \OxidEsales\Eshop\Core\Registry::getSession()->setVariable('neworder_sess', null);
            }

            $this->onCategoryChange($sId);
        }
    }
1202620
public function destroy(Category $category)
    {
        if ($category->isRoot()) {
            abort(404);
        }

        if ($category->articles()->count()) {
            return $this->notifyError(trans('cms::categories.destroy.error'));
        }

        $category->delete();

        return $this->notifySuccess(trans('cms::categories.destroy.success'));
    }
839933
public function clear()
    {
        if (null !== $this->aGroup) {
            $this->aGroup->removeSkillGroup($this);
        }
        if (null !== $this->aSkill) {
            $this->aSkill->removeSkillGroup($this);
        }
        $this->skill_id = null;
        $this->group_id = null;
        $this->alreadyInSave = false;
        $this->clearAllReferences();
        $this->resetModified();
        $this->setNew(true);
        $this->setDeleted(false);
    }
120467
public function remove()
    {
        //if user selected not to update modules, skipping all updates
        if (\OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter("noButton")) {
            \OxidEsales\Eshop\Core\Registry::getSession()->setVariable("blSkipDeletedExtChecking", true);

            return;
        }

        $oModuleList = oxNew(\OxidEsales\Eshop\Core\Module\ModuleList::class);
        $oModuleList->cleanup();
    }
782722
private function CleanPageArticleLists()
    {
        $oldArchive = Archive::Schema()->ByPage($this->Page());
        if ($oldArchive) {
            $oldArchive->SetPage(null);
            $oldArchive->Save();
        }
        $oldCategory = Category::Schema()->ByPage($this->Page());
        if ($oldCategory) {
            $oldCategory->SetPage(null);
            $oldCategory->Save();
        }
    }
373056
public function removeArticle()
    {
        if (!\OxidEsales\Eshop\Core\Registry::getSession()->checkSessionChallenge()) {
            return;
        }

        if (!$this->getViewConfig()->getShowListmania()) {
            return;
        }

        if (($sArtId = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('aid')) &&
            ($oRecommList = $this->getActiveRecommList())
        ) {
            $oRecommList->removeArticle($sArtId);
        }
        $this->_sThisTemplate = 'page/account/recommendationedit.tpl';
    }