public function _costCenter($from, $to, $action)
{
switch ($action) {
case static::ACT_CONVERT_TO_OBJECT:
/* @var $from ProjectEntity */
$to->costCenter = ['id' => $from->ccId];
break;
case static::ACT_CONVERT_TO_ENTITY:
/* @var $to ProjectEntity */
$to->ccId = ApiController::getBareId($from, 'costCenter');
break;
case static::ACT_GET_FILTER_CRITERIA:
return [['ccId' => ApiController::getBareId($from, 'costCenter')]];
}
}