CodeExplorer cleanData example
if (!
isset($params['shippingFree'
]) ||
$params['shippingFree'
] === '' ||
$params['shippingFree'
] === '0'
) { $params['shippingFree'
] = null;
} else { $params['shippingFree'
] =
(float) str_replace(',', '.',
$params['shippingFree'
]);
} $params['payments'
] =
new ArrayCollection();
$params['holidays'
] =
new ArrayCollection();
$params['countries'
] =
new ArrayCollection();
$params['categories'
] =
new ArrayCollection();
$params['multiShopId'
] =
$this->
cleanData($params['multiShopId'
]);
$params['customerGroupId'
] =
$this->
cleanData($params['customerGroupId'
]);
$params['bindTimeFrom'
] =
$this->
cleanData($params['bindTimeFrom'
]);
$params['bindTimeTo'
] =
$this->
cleanData($params['bindTimeTo'
]);
$params['bindInStock'
] =
$this->
cleanData($params['bindInStock'
] ?? null
);
$params['bindWeekdayFrom'
] =
$this->
cleanData($params['bindWeekdayFrom'
]);
$params['bindWeekdayTo'
] =
$this->
cleanData($params['bindWeekdayTo'
]);
$params['bindWeightFrom'
] =
$this->
cleanData($params['bindWeightFrom'
]);
$params['bindWeightTo'
] =
$this->
cleanData($params['bindWeightTo'
]);
$params['bindPriceFrom'
] =
$this->
cleanData($params['bindPriceFrom'
]);
$params['bindPriceTo'
] =
$this->
cleanData($params['bindPriceTo'
] ?? null
);
$params['bindSql'
] =
$this->
cleanData($params['bindSql'
]);