/** * @param WpTermTaxonomy $objWpTermTaxonomy The DB ORM object to process */ protected function process_object($objWpTermTaxonomy) { $objWpTermTaxonomy->Count = WpTermRelationships::CountByTermTaxonomyId($objWpTermTaxonomy->TermTaxonomyId); $objWpTermTaxonomy->Save(); $this->intTermTaxonomyCount++; }
/** * Counts all associated WpTermRelationshipsesAsTermTaxonomy * @return int */ public function CountWpTermRelationshipsesAsTermTaxonomy() { if (is_null($this->intTermTaxonomyId)) { return 0; } return WpTermRelationships::CountByTermTaxonomyId($this->intTermTaxonomyId); }