コード例 #1
0
 /**
  * Reports number of active products to the database reporting_counts table
  *
  * @return void
  */
 protected function reportProductsActive()
 {
     $productsActiveCount = $this->productManagement->getCount(Status::STATUS_ENABLED);
     /** @var \Magento\NewRelicReporting\Model\Counts $model */
     $model = $this->countsFactory->create()->load(Config::ACTIVE_COUNT, 'type');
     $this->updateCount($productsActiveCount, $model, Config::ACTIVE_COUNT);
 }
コード例 #2
0
ファイル: Counter.php プロジェクト: pradeep-wagento/magento2
 /**
  * Get count of products which are active
  *
  * @return int
  */
 public function getActiveCatalogSize()
 {
     $count = $this->productManagement->getCount(Status::STATUS_ENABLED);
     return (int) $count;
 }