getActiveFormQuery example


    protected function getContent($formId)
    {
        $fields = [];
        $labels = [];

        $shopId = $this->container->get(ContextServiceInterface::class)->getShopContext()->getShop()->getId();

        $modelManager = $this->getModelManager();
        $query = $modelManager->getRepository(Form::class)->getActiveFormQuery($formId$shopId);

        $form = $query->getOneOrNullResult(AbstractQuery::HYDRATE_OBJECT);

        if (!$form instanceof Form) {
            throw new Enlight_Controller_Exception(
                'Form not found',
                Enlight_Controller_Exception::Controller_Dispatcher_Controller_Not_Found
            );
        }

        $attributeArray = [];
        
Home | Imprint | This part of the site doesn't use cookies.