src/CoreBundle/EventListener/DcGeneral/Breadcrumb/GetMetaModelTrait.php
protected function getMetaModel($metaModelId)
    {
        if (null === $this->factory) {
            throw new \RuntimeException('No factory set.');
        }

        $metaModelName = $this->factory->translateIdToMetaModelName($metaModelId);
        $metaModel     = $this->factory->getMetaModel($metaModelName);

        return $metaModel;
    }
protected function getMetaModel($metaModelId)
    {
        if (null === $this->factory) {
            throw new \RuntimeException('No factory set.');
        }

        $metaModelName = $this->factory->translateIdToMetaModelName($metaModelId);
        $metaModel     = $this->factory->getMetaModel($metaModelName);

        return $metaModel;
    }
Retrieve the MetaModel instance.

@param string $metaModelId The MetaModel id.

@return IMetaModel

@throws \RuntimeException Throws if no factory set.