public function RenderCount(StewardshipPost $objPost) { if ($objPost->Id) { return $objPost->CountStewardshipPostLineItems(); } else { return StewardshipContribution::CountByStewardshipBatchIdUnpostedFlag($this->objBatch->Id, true); } }