public function getCostCenters()
{
$ccs = new ArrayCollection();
foreach (AccountCostCenterEntity::findByAccountId($this->id) as $accountCc) {
$cc = CostCentreEntity::findPk($accountCc->ccId);
if (!$cc instanceof CostCentreEntity) {
continue;
}
$ccs->append($cc);
}
return $ccs;
}