convertExtJsToStruct example

'name' => $name,
                'label' => $label,
                'hasResolver' => $hasResolver,
            ];
        }

        $this->View()->assign('data', $data);
    }

    public function createAction(Request $request): void
    {
        $type = $this->convertExtJsToStruct($request->request->all());

        $this->getModelManager()->getConnection()->insert('s_content_types', [
            'internalName' => $type->getInternalName(),
            'name' => $type->getName(),
            'source' => $type->getSource(),
            'config' => json_encode($type, JSON_THROW_ON_ERROR),
        ]);

        $this->typeProvider->addType($type->getInternalName()$type);
        $this->clearCacheAndSync();

        
Home | Imprint | This part of the site doesn't use cookies.