src/BackendIntegration/SearchablePages.php
protected function getMetaModel($identifier, $ignoreError)
    {
        // Get the factory.
        $factory = $this->getMetaModelsFactory();

        // Id to name.
        if (is_numeric($identifier)) {
            $identifier = $factory->translateIdToMetaModelName($identifier);
        }

        // Create mm, if yowl is true check if we have really a mm .
        $metaModels = $factory->getMetaModel($identifier);

        // If $ignoreError is off and we have no mm throw a new exception.
        if (!$ignoreError && $metaModels == null) {
            throw new \RuntimeException('Could not find the MetaModels with the name ' . $identifier);
        }

        return $metaModels;
    }
protected function getMetaModel($identifier, $ignoreError)
    {
        // Get the factory.
        $factory = $this->getMetaModelsFactory();

        // Id to name.
        if (is_numeric($identifier)) {
            $identifier = $factory->translateIdToMetaModelName($identifier);
        }

        // Create mm, if yowl is true check if we have really a mm .
        $metaModels = $factory->getMetaModel($identifier);

        // If $ignoreError is off and we have no mm throw a new exception.
        if (!$ignoreError && $metaModels == null) {
            throw new \RuntimeException('Could not find the MetaModels with the name ' . $identifier);
        }

        return $metaModels;
    }
Get a MetaModels by name or id.

@param string|int $identifier  The Name or ID of a MetaModels.

@param boolean    $ignoreError If true ignore errors like the MetaModels was not found.

@return IMetaModel|null

@throws \RuntimeException When the MetaModels is missing.