/** * Reports category size to the database reporting_counts table * * @return void */ protected function reportCategorySize() { $categoryCount = $this->categoryManagement->getCount(); /** @var \Magento\NewRelicReporting\Model\Counts $model */ $model = $this->countsFactory->create()->load(Config::CATEGORY_SIZE, 'type'); $this->updateCount($categoryCount, $model, Config::CATEGORY_SIZE); }
/** * Get count of categories, minus one which is the root category * * @return int */ public function getCategoryCount() { $count = $this->categoryManagement->getCount(); return (int) $count; }