MetaModels\DcGeneral\Events\Table\InputScreenCondition\Subscriber::getMetaModel PHP Method

getMetaModel() public method

Retrieve the MetaModel attached to the model condition setting.
public getMetaModel ( ContaoCommunityAlliance\DcGeneral\EnvironmentInterface $interface ) : MetaModels\IMetaModel
$interface ContaoCommunityAlliance\DcGeneral\EnvironmentInterface The environment.
return MetaModels\IMetaModel
    public function getMetaModel(EnvironmentInterface $interface)
    {
        $metaModelId = $this->getDatabase()->prepare('SELECT id FROM tl_metamodel WHERE
                id=(SELECT pid FROM tl_metamodel_dca WHERE
                id=(SELECT pid FROM tl_metamodel_dcasetting WHERE id=?))')->execute(ModelId::fromSerialized($interface->getInputProvider()->getParameter('pid'))->getId());
        return $this->getMetaModelById($metaModelId->id);
    }