Piwik\Plugins\Goals\API::convertSpecialGoalIds PHP Метод

convertSpecialGoalIds() защищенный статический Метод

Checks for the following values: Piwik::LABEL_ID_GOAL_IS_ECOMMERCE_ORDER Piwik::LABEL_ID_GOAL_IS_ECOMMERCE_CART
protected static convertSpecialGoalIds ( string | integer $idGoal ) : integer
$idGoal string | integer The goal id as an integer or a special string.
Результат integer The numeric goal id.
    protected static function convertSpecialGoalIds($idGoal)
    {
        if ($idGoal == Piwik::LABEL_ID_GOAL_IS_ECOMMERCE_ORDER) {
            return GoalManager::IDGOAL_ORDER;
        } else {
            if ($idGoal == Piwik::LABEL_ID_GOAL_IS_ECOMMERCE_CART) {
                return GoalManager::IDGOAL_CART;
            } else {
                return $idGoal;
            }
        }
    }