MetaModels\DcGeneral\Events\Table\InputScreenSortGroup\Subscriber::getMetaModel PHP Метод

getMetaModel() публичный Метод

Retrieve the MetaModel attached to the model filter setting.
public getMetaModel ( ContaoCommunityAlliance\DcGeneral\EnvironmentInterface $environment ) : MetaModels\IMetaModel
$environment ContaoCommunityAlliance\DcGeneral\EnvironmentInterface The environment.
Результат MetaModels\IMetaModel
    public function getMetaModel(EnvironmentInterface $environment)
    {
        $metaModelId = $this->getDatabase()->prepare('SELECT id FROM tl_metamodel WHERE id=(SELECT pid FROM tl_metamodel_dca WHERE id=?)')->execute(ModelId::fromSerialized($environment->getInputProvider()->getParameter('pid'))->getId());
        /** @noinspection PhpUndefinedFieldInspection */
        return $this->getMetaModelById($metaModelId->id);
    }