public function setMeta($metaEntities)
{
$currentMeta = $this->entity->getMeta();
foreach ($metaEntities as $singleMeta) {
$metaEntity = $this->getSingleMetaById($currentMeta, $singleMeta->getId());
if (!$metaEntity) {
$metaEntity = $singleMeta;
$this->entity->addMeta($metaEntity);
}
$metaEntity->setCategory($this->entity);
$metaEntity->setKey($singleMeta->getKey());
$metaEntity->setValue($singleMeta->getValue());
$metaEntity->setLocale($singleMeta->getLocale());
}
return $this;
}