Resets vendor (all vendors) article count

@param string $sVendorId Category/vendor ID
350903
public function resetVendorArticleCount($sVendorId = null)
    {
        if (!$sVendorId) {
            \OxidEsales\Eshop\Core\Registry::getConfig()->setGlobalParameter('aLocalVendorCache', null);
            \OxidEsales\Eshop\Core\Registry::getUtils()->toFileCache('aLocalVendorCache', '');
        } else {
            // loading from cache
            $aVendorData = $this->_getVendorCache();
            if (isset($aVendorData[$sVendorId])) {
                unset($aVendorData[$sVendorId]);
                $this->_setVendorCache($aVendorData);
            }
        }
    }
61222
public function setMerchantID($merchantID)
    {
        if (!Icepay_Parameter_Validation::merchantID($merchantID))
            throw new Exception('MerchantID not valid');

        $this->_merchantID = (int) $merchantID;

        return $this;
    }
1216717
protected function resetSKUs(){
        foreach($this->options as $op=>$junk){
            if(preg_match("#SellerSKUList#",$op)){
                unset($this->options[$op]);
            }
        }
        //remove Category-specific name
        unset($this->options['SellerSKU']);
    }
321689
public function resetLanguage($langId)
    {
        if ((int) $langId === 0) {
            return;
        }

        $tables = $this->getAllTables();

        // removing tables which does not requires reset
        foreach ($this->_aSkipTablesOnReset as $skipTable) {
            if (($skipId = array_search($skipTable, $tables)) !== false) {
                unset($tables[$skipId]);
            }
        }

        foreach ($tables as $tableName) {
            $this->resetMultilangFields($langId, $tableName);
        }
    }
237503
protected function _resetCategoriesCounter($sArticleId)
    {
        $oDb = \OxidEsales\Eshop\Core\DatabaseProvider::getDb();
        $sQ = "select oxcatnid from oxobject2category where oxobjectid = " . $oDb->quote($sArticleId);
        $oRs = $oDb->select($sQ);
        if ($oRs !== false && $oRs->count() > 0) {
            while (!$oRs->EOF) {
                $this->resetCounter("catArticle", $oRs->fields[0]);
                $oRs->fetchRow();
            }
        }
    }
274241
public function reset()
  {
      $this->values[self::GROUP_ID] = null;
      $this->values[self::SENDER_KEY] = null;
  }
1204177
public function reset()
    {
        $this->description = null;
        $this->title_session = null;
        $this->next = null;
        $this->prev = null;
        $this->canonical = null;
        $this->amphtml = null;
        $this->metatags = [];
        $this->keywords = [];
        $this->alternateLanguages = [];
        $this->robots = null;
    }
716507
function resetOptionCounter()
    {
        $maxValue = 0;
        foreach ( $this->Options as $optionList )
        {
            foreach ( $optionList['optionlist'] as $option )
            {
                if ( $maxValue < $option['option_id'] )
                {
                    $maxValue = $option['option_id'];
                }
            }
        }
        $this->OptionCounter = $maxValue;
    }
418
protected function _generateVendorDir($sVendor)
    {
        $sVendorDir = $this->_sModuleDir . $sVendor . DIRECTORY_SEPARATOR;
        if (!file_exists($sVendorDir)) {
            mkdir($sVendorDir);

            // Generate vendor metadata file
            file_put_contents($sVendorDir . 'vendormetadata.php', '<?php');
        }
    }
217661
@Managed
   @ManagedDescription("Reset all the statistics.")
   public static void resetAll(
      @ManagedDescription("The name of the category of the statistics") 
      @ManagedName("categoryName") String category)
   {
      StatisticsContext context = getContext(category);
      if (context != null)
      {
         context.reset();
      }
   }
134703
protected function resetReportIds(){
        foreach($this->options as $op=>$junk){
            if(preg_match("#ReportIdList#",$op)){
                unset($this->options[$op]);
            }
        }
    }
1296711
public function invalidateModuleCache(string $moduleId)
    {
        /**
         * @TODO we have to implement it in ShopModuleCacheService or use ModuleCache::resetCache() method.
         */
        $module = oxNew(Module::class);

        $templates = $module->getTemplates($moduleId);
        $utils = Registry::getUtils();
        $utils->resetTemplateCache($templates);
        $utils->resetLanguageCache();
        $utils->resetMenuCache();

        ModuleVariablesLocator::resetModuleVariables();

        if (extension_loaded('apc') && ini_get('apc.enabled')) {
            apc_clear_cache();
        }
    }
191780
def reset(self, subject_id, entity_id):
        
        if not self._cache.set(_key(subject_id, entity_id), {}, 0):
            raise CacheError("reset failed")
823642
public void setVendor( final CharSequence vendor) {
		if ( vendor != null) format.getHeader().createEntry( VENDOR, vendor);
	}
95260
public function setCategoryId($categoryId = '')
    {
        $this->categoryId = $categoryId;
        $this->logger->info(__FUNCTION__, 'setCategoryId: ' . $this->categoryId);
    }
1243213
private function disableVendor($vendorData)
    {

        $vendor = $this->vendorManager->findByMiraklId($vendorData['shop_id']);
        $logVendor = $this->logVendorManager->findByMiraklId($vendorData['shop_id']);

        if ($vendor) {
            $this->logger->info(
                'Shop ' . $vendorData['shop_id'] . ' found in database',
                array('miraklId' => $vendorData['shop_id'], "action" => "Wallet creation")
            );
            if ($vendor->getEnabled() || $vendor->getEnabled() === null) {
                $vendor->setEnabled(false);
                $this->vendorManager->save($vendor);
                if ($logVendor !== null) {
                    $logVendor->setEnabled(false);
                    $this->logVendorManager->save($logVendor);
                }
                $this->logger->info(
                    'Shop ' . $vendorData['shop_id'] . ' disabled',
                    array('miraklId' => $vendorData['shop_id'], "action" => "Wallet creation")
                );
            } else {
                $this->logger->info(
                    'Shop ' . $vendorData['shop_id'] . ' already disabled',
                    array('miraklId' => $vendorData['shop_id'], "action" => "Wallet creation")
                );
            }
        }
    }
726805
public function DeleteCategory($CategoryID = FALSE) {
      // Check permission
      $this->Permission('Garden.Settings.Manage');
      
      // Set up head
      $this->AddJsFile('categories.js');
      $this->Title(T('Delete Category'));
      $this->AddSideMenu('vanilla/settings/managecategories');

      // Get category data
      $this->Category = $this->CategoryModel->GetID($CategoryID);
      
      
      if (!$this->Category) {
         $this->Form->AddError('The specified category could not be found.');
      } else {
         // Make sure the form knows which item we are deleting.
         $this->Form->AddHidden('CategoryID', $CategoryID);
         
         // Get a list of categories other than this one that can act as a replacement
         $this->OtherCategories = $this->CategoryModel->GetWhere(
            array(
               'CategoryID <>' => $CategoryID,
               'AllowDiscussions' => $this->Category->AllowDiscussions, // Don't allow a category with discussion to be the replacement for one without discussions (or vice versa)
               'CategoryID >' => 0
            ),
            'Sort'
         );
         
         if (!$this->Form->AuthenticatedPostBack()) {
            $this->Form->SetFormValue('DeleteDiscussions', '1'); // Checked by default
         } else {
            $ReplacementCategoryID = $this->Form->GetValue('ReplacementCategoryID');
            $ReplacementCategory = $this->CategoryModel->GetID($ReplacementCategoryID);
            // Error if:
            // 1. The category being deleted is the last remaining category that
            // allows discussions.
            if ($this->Category->AllowDiscussions == '1'
               && $this->OtherCategories->NumRows() == 0)
               $this->Form->AddError('You cannot remove the only remaining category that allows discussions');
            
            /*
            // 2. The category being deleted allows discussions, and it contains
            // discussions, and there is no replacement category specified.
            if ($this->Form->ErrorCount() == 0
               && $this->Category->AllowDiscussions == '1'
               && $this->Category->CountDiscussions > 0
               && ($ReplacementCategory == FALSE || $ReplacementCategory->AllowDiscussions != '1'))
               $this->Form->AddError('You must select a replacement category in order to remove this category.');
            */
            
            // 3. The category being deleted does not allow discussions, and it
            // does contain other categories, and there are replacement parent
            // categories available, and one is not selected.
            /*
            if ($this->Category->AllowDiscussions == '0'
               && $this->OtherCategories->NumRows() > 0
               && !$ReplacementCategory) {
               if ($this->CategoryModel->GetWhere(array('ParentCategoryID' => $CategoryID))->NumRows() > 0)
                  $this->Form->AddError('You must select a replacement category in order to remove this category.');
            }
            */
            
            if ($this->Form->ErrorCount() == 0) {
               // Go ahead and delete the category
               try {
                  $this->CategoryModel->Delete($this->Category, $this->Form->GetValue('ReplacementCategoryID'));
               } catch (Exception $ex) {
                  $this->Form->AddError($ex);
               }
               if ($this->Form->ErrorCount() == 0) {
                  $this->RedirectUrl = Url('vanilla/settings/managecategories');
                  $this->InformMessage(T('Deleting category...'));
               }
            }
         }
      }
      
      // Render default view
      $this->Render();
   }