public function ajaxIndexAction(Request $request): Response
    {
        if (!$request->isXmlHttpRequest()) {
            return $this->redirectToAction('index');
        }
        
        $attributeGroupId = (int)$request->request->get('id');
        $attributeGroup   = $this->getManager()->findAttributeGroup($attributeGroupId);
        
        return $this->jsonResponse([
            'attributes' => $this->getManager()->getRepository()->getAttributeSet($attributeGroup),
        ]);
    }
public function ajaxIndexAction(Request $request): Response
    {
        if (!$request->isXmlHttpRequest()) {
            return $this->redirectToAction('index');
        }
        
        $attributeGroupId = (int)$request->request->get('id');
        $attributeGroup   = $this->getManager()->findAttributeGroup($attributeGroupId);
        
        return $this->jsonResponse([
            'attributes' => $this->getManager()->getRepository()->getAttributeSet($attributeGroup),
        ]);
    }
public function ajaxIndexAction ( Request $ request ) : Response { if ( ! $ request -> isXmlHttpRequest ( ) ) { return $ this -> redirectToAction ( 'index' ) ; } $ attributeGroupId = ( int ) $ request -> request -> get ( 'id' ) ; $ attributeGroup = $ this -> getManager ( ) -> findAttributeGroup ( $ attributeGroupId ) ; return $ this -> jsonResponse ( [ 'attributes' => $ this -> getManager ( ) -> getRepository ( ) -> getAttributeSet ( $ attributeGroup ) , ] ) ; }
Ajax action for listing attributes in variants editor

@param Request $request

@return Response
Ajax action for listing attributes in variants editor