Scalr\Api\Service\User\V1beta0\Adapter\ProjectAdapter::_costCenter PHP Method

_costCenter() public method

public _costCenter ( $from, $to, $action )
    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')]];
        }
    }