public function parse(array $data, ParsingDispatcher $parsingDispatcher)
{
if (!array_key_exists('ParentLocationRemoteIdCriterion', $data)) {
throw new Exceptions\Parser('Invalid <ParentLocationRemoteIdCriterion> format');
}
$contentIdArray = array();
foreach (explode(',', $data['ParentLocationRemoteIdCriterion']) as $parentRemoteId) {
$location = $this->locationService->loadLocationByRemoteId($parentRemoteId);
$contentIdArray[] = $location->id;
}
return new ParentLocationIdCriterion($contentIdArray);
}