/**
* @return PriceRule
*/
public function hydratePriceRule(array
$data) { $price =
new PriceRule();
$price->
setId((int) $data['__price_id'
]);
$price->
setFrom((int) $data['__price_from'
]);
$price->
setPrice((float) $data['__price_price'
]);
$price->
setPseudoPrice((float) $data['__price_pseudoprice'
]);
$price->
setRegulationPrice((float) $data['__price_regulation_price'
]);
if (strtolower($data['__price_to'
]) === 'beliebig'
) { $price->
setTo(null
);
} else { $price->
setTo((int) $data['__price_to'
]);
} if (isset($data['__priceAttribute_id'
])) { $this->attributeHydrator->
addAttribute($price,
$data, 'priceAttribute'
);
}