public function getMetaModel($metaModelName)
{
$event = new CreateMetaModelEvent($this, $metaModelName);
$this->getEventDispatcher()->dispatch($event::NAME, $event);
$metaModel = $event->getMetaModel();
if ($metaModel) {
$attributeFactory = $this->getServiceContainer()->getAttributeFactory();
foreach ($attributeFactory->createAttributesForMetaModel($metaModel) as $attribute) {
$metaModel->addAttribute($attribute);
}
}
return $metaModel;
}