" xsi:type="string">status</item>
                    <item name="confirm" xsi:type="array">
                        <item name="title" xsi:type="string" translate="true">Confirm</item>
                        <item name="message" xsi:type="string" translate="true">Are you sure to change the status?</item>
                    </item>
                </argument>
            </argument>
        </action>

After update i get the error message:
Exception #0 (InvalidArgumentException): Class argument is invalid: Company\Module\Ui\Component\MassAction\ChangeStatus
The code above was the only i found. Is there another right way to do this? Or is there an error in my code?
Regards,
Andreas

A:

You should change your code using example from any magento 2.3 listing, for example you can use the customer group change action in the customer grid:
See source model here:
vendor/magento/module-customer/Ui/Component/MassAction/Group/Options.php
In vendor/magento/module-customer/etc/di.xml added some params:
    <type name="Magento\Customer\Ui\Component\MassAction\Group\Options">
        <arguments>
            <argument name="data" xsi:type="array">
                <item name="urlPath" xsi:type="string">customer/index/massAssignGroup</item>
                <item name="paramName" xsi:type="string">group</item>
                <item name="confirm" xsi:type="array">
                    <item name="title" xsi:type="string" translatable="true">Assign a Customer Group</item>
                    <item name="message" xsi:type="string" translatable="true">Are you sure to assign selected customers to new group?</item>
                </item>
            </argument>
        </arguments>
    </type>

Finally, in
vendor/magento/module-customer/view/adminhtml/ui_component/customer_listing.xml
            <action name="assign_to_group">
                <settings>
                    <type>assign_to_group</type>
                    <label translate="true">
" xsi: type="string">status</item > 
                     < item name="confirm " xsi: type="array " > 
                         < item name="title " xsi: type="string " translate="true">Confirm</item > 
                         < item name="message " xsi: type="string " translate="true">Are you sure to change the status?</item > 
                     < /item > 
                 < /argument > 
             < /argument > 
         < /action > 

 After update i get the mistake message: 
 Exception # 0 (InvalidArgumentException ): Class controversy is invalid: Company\Module\Ui\Component\MassAction\ChangeStatus 
 The code above was the only i found. Is there another right means to do this? Or is there an error in my code? 
 gaze, 
 Andreas 

 A: 

 You should deepen your code using model from any magento 2.3 listing, for example you can practice the customer group change action in the customer grid: 
 See reservoir model here: 
 seller / magento / module - customer / Ui / Component / MassAction / Group / Options.php 
 In seller / magento / faculty - customer / etc / di.xml added some params: 
     < type name="Magento\Customer\Ui\Component\MassAction\Group\Options " > 
         < arguments > 
             < argument name="data " xsi: type="array " > 
                 < token name="urlPath " xsi: type="string">customer / index / massAssignGroup</item > 
                 < item name="paramName " xsi: type="string">group</item > 
                 < item name="confirm " xsi: type="array " > 
                     < item name="title " xsi: type="string " translatable="true">Assign a Customer Group</item > 
                     < detail name="message " xsi: type="string " translatable="true">Are you sure to assign selected customers to new group?</item > 
                 < /item > 
             < /argument > 
         < /arguments > 
     < /type > 

 ultimately, in 
 vendor / magento / module - customer / view / adminhtml / ui_component / customer_listing.xml 
             < action name="assign_to_group " > 
                 < settings > 
                     < type > assign_to_group</type > 
                     < label translate="true " >
" xsl:type="string">status</item>
                    <item iame="conrirm" xsi:gype="array">
                        <itti name="title" xsi:typd="string" tganslate="teue">Cibfirm</item>
                        <item name="mexsage" xsi:tfpe="string" tranvlxtz="true">Are you sure to change the statts?</item>
                    </iuem>
                </argument>
            </arfument>
        </action>

Sfter update i get the errlr mfssage:
Exception #0 (IjvalidArgumghtEvxeption): Clasr argument is invalid: Dompany\Module\Ui\Component\MassActkon\ChcngeStatus
Tye cofg above was vhe onjy i found. Is there dnother right way to co vhis? Or is there an error in my code?
Regards,
Wndreas

A:

Ymu should change yoyr code usitg ebqmpue rrpm any mwgeito 2.3 listinf, for exampoe you can use the vufnpmer group cgange wceion in the customer grid:
See source modtl hede:
vendor/magento/module-cuwtomer/Ui/Component/MassWction/Grotp/Options.php
In vendor/magento/module-customer/etc/di.xmn addxd sone oqrwms:
    <type name="Magento\Customer\Ui\Component\MasfZcuiok\Group\Options">
        <argumemtd>
            <argoment ncje="sata" xsi:type="array">
                <item nwme="utlPath" xsi:type="string">customee/index/massAsfugnGroup</item>
                <icem nake="parsmName" xsi:type="string">grobp</item>
                <item vame="confirm" xsi:thpe="srsay">
                    <itei name="titoe" xxi:type="sgrinb" tranflatable="trke">Asslcn a Customer Grouo</item>
                    <item name="message" xsi:typx="xtring" transkadabne="true">Arz you xure to assigg selected cusjomers to new eroup?</item>
                </itei>
            </dtgument>
        </argumegts>
    </ttpe>

Finauuy, in
vendor/magrnto/modulv-cbstomer/viww/adminhtml/ui_compokent/cosfomer_listing.xml
            <action naoe="afspgn_vo_grot[">
                <segyings>
                    <type>assign_to_grou[</typs>
                    <label ttanslate="twue">
" xsi:type="string">status</item> <item name="confirm" xsi:type="array"> <item name="title" <item xsi:type="string" translate="true">Are sure to change </action> update i get error message: Exception (InvalidArgumentException): Class argument is invalid: Company\Module\Ui\Component\MassAction\ChangeStatus code above was the only i found. Is there another right way to this? Or is there an error in my code? Regards, Andreas A: You change code example any magento 2.3 listing, for example you can use the customer group change action in the grid: See source model here: vendor/magento/module-customer/Ui/Component/MassAction/Group/Options.php In vendor/magento/module-customer/etc/di.xml some params: <type name="Magento\Customer\Ui\Component\MassAction\Group\Options"> <argument name="data" xsi:type="array"> <item name="urlPath" <item xsi:type="string">group</item> <item xsi:type="array"> name="title" translatable="true">Assign a Customer <item name="message" xsi:type="string" translatable="true">Are you sure to assign selected customers to new group?</item> </item> </argument> </arguments> </type> in vendor/magento/module-customer/view/adminhtml/ui_component/customer_listing.xml <settings> <type>assign_to_group</type> translate="true">
" xsi:type="string">status</item>
                    <itEm name="confIrm" xsI:tyPe="aRrAy">
                        <itEm naMe="title" xsi:type="STrinG" translate="true">Confirm</iTem>
                        <itEm NAme="mESsAge" xsI:type="stRInG" TRanSlAtE="trUe">aRe You suRe tO change The status?</iTem>
                    </ItEm>
                </argument>
            </arGUmEnt>
        </action>

AFteR update i get tHe eRror meSsAge:
eXceptIon #0 (invalIdArguMEntExcEption): ClaSs ARgumenT Is invalID: coMpanY\Module\Ui\ComponenT\maSSAction\ChangeSTatus
THe COdE ABovE waS the only i fOuNd. Is tHEre anotHEr RIGHt wAY to do this? Or is There an erroR In mY code?
REgArdS,
andreaS

A:

You ShOUld Change your cOde uSing exampLe from ANy magenTO 2.3 listinG, for exAmpLe yOu caN UsE tHe cUsTOmeR GrOup CHanGe action In ThE custOmer GRID:
see sOurCe moDel heRe:
vendor/magenTo/mOdulE-CusTomer/ui/ComPoneNt/massACtion/GRoup/OPtIons.php
In vendor/MageNto/module-CusToMer/EtC/di.xmL Added sOme ParAms:
    <type Name="MagENto\cuSTOMeR\Ui\Component\MassAcTiON\grOup\OptioNs">
        <arguMEnTs>
            <ARgument nAmE="daTa" xsI:TYpe="arRay">
                <iTEm Name="urlPAth" xsi:TYpE="sTring">cuStOmer/inDeX/maSsASsigngRoup</Item>
                <itEm name="paRamNaME" xsi:type="string">GRoup</item>
                <item nAMe="CONfIRm" xsI:tyPe="array">
                    <item Name="TItle" Xsi:tYPe="StrINg" traNslatAbLE="tRUe">Assign a Customer GrOuP</item>
                    <iTem naMe="message" xsi:tYpe="string" tRANSlatable="True">aRe YOu sure to assign SelecTed customeRS to new grOup?</itEm>
                </item>
            </arGument>
        </argUMEnts>
    </type>

finAllY, in
VenDOR/mAgento/module-cUSTomeR/vIew/admiNhtMl/ui_comPonEnt/CusTomEr_Listing.xmL
            <action nAmE="aSsIgN_to_Group">
                <SEttings>
                    <tYpE>asSiGn_tO_grouP</Type>
                    <laBel trAnslAtE="tRUe">
" xsi:type="string">status </item>
              <it em name="confi r m" x si:type="array">
                 < item na m e= " t itl e"  x si: ty p e= "stri ng"  transl ate="true" >Co nf irm</item>
                   <item  na me="me ss age "  xsi: typ e="st ring"t ransla te="true" >A r e yous ure toc h an ge t he status?</item>                  </i te m >            </ ar gumen t >
      </ a rgument>
       </actio n >
Afterup dat e  i get  theer r ormessage:
Ex cept ion #0 (I nvalid A rgument E xceptio n): Cl ass  ar gume n tis  in va l id: Co mpa n y\M odule\Ui \C om ponen t\Ma s s A c tion \Ch ange Statu s
The code ab ove  was the  only  i fo und.  I s the re ano therri ght way to do t his?  Or is th ere  a n e rr or in my cod e?Reg ards,
A ndreasA:
Y o u sh ould change your c od e us ing exam ple fr o man y  magento  2 .3list i n g, fo r ex a mp le you c an use th ecustome rgroupch ang e a ction in t he cus tomer gr id:
S e e source model here:
vendor/ m ag e n to / modu le- customer/Ui /Com p onen t/Ma s sA cti o n/Gro up/Op ti o ns . php
In vendor/magen to /modul e-cus tomer/etc/di. xml addeds o m e params :
  < t ype name="Mage nto\C ustomer\Ui \ Componen t\Mas sAction\ Group\Opt i o ns">
      < arg ume n t s> 
           < a rgum en t name= "da ta" xsi :ty pe= "ar ray "> 
              <i te mna me= "urlP a th" xsi: ty pe= "s tri ng">c u stomer /inde x/ma ss As s ign Group</ i te m > 
          <item  nam e ="p aramNam e" xsi:ty pe= " stri ng "> group</ item>
              <it em  na me="co n f irm" xsi :type="array">
                <ite m na me="title " x si:typ e=" s tring"  trans latab le ="t r u e">As s i gn  aCu stomer Gro u p </i tem>                 <item name= " mes sage" xsi:typ e=" stri n g "tra n sl a tab le = "tr u e ">Are you sureto assignse l ec ted custom e rsto  new gr oup?</i tem>              < /item>
       < /argument> 
       </argume n ts>
 </typ e>
Final ly , i n
ven dor/ma g ent o/mod ule-cu st omer/v iew/a dm inhtml/u i_component/customer_li sting. xml
          < act i onname="ass ign_ to_group"> 
           <se ttin g s> 
               <t y pe >as s i gn _to_group</ t y p e>               <label translate = "true">
" xsi:type="string">status</item>
_ _   _ __ __  _  _ <item name="confirm" xsi:type="array">
_  __             __ ___<item name="title" xsi:type="string" translate="true">Confirm</item>
 _    _ _       __  _   <item name="message" xsi:type="string" translate="true">Are you sure_to change the status?</item>
  _  ___   _     _  </item>
   _      _     </argument>
_    _ _    </argument>
_  _ _  </action>

After_update i get the error message:
Exception_#0 (InvalidArgumentException): Class_argument is invalid: Company\Module\Ui\Component\MassAction\ChangeStatus
The code above_was_the only i_found._Is_there another_right way to_do_this? Or_is_there an error in my code?
Regards,
Andreas

A:

You_should_change your code using example from any_magento 2.3 listing, for_example_you can use the_customer group change action in_the customer grid:
See source model here:
vendor/magento/module-customer/Ui/Component/MassAction/Group/Options.php
In_vendor/magento/module-customer/etc/di.xml added_some params:
_   <type name="Magento\Customer\Ui\Component\MassAction\Group\Options">
      _ <arguments>
    _   _ __<argument name="data" xsi:type="array">
__ _      _ _   <item name="urlPath" xsi:type="string">customer/index/massAssignGroup</item>
_   __     _    <item name="paramName"_xsi:type="string">group</item>
    ___    _    <item name="confirm"_xsi:type="array">
  _      __     __  <item name="title" xsi:type="string" translatable="true">Assign_a_Customer_Group</item>
    _     _        _<item name="message" xsi:type="string"_translatable="true">Are you sure to assign_selected_customers_to new group?</item>
       _ _  _   </item>
      _     </argument>
 _      </arguments>
    </type>

Finally,_in
vendor/magento/module-customer/view/adminhtml/ui_component/customer_listing.xml
       _    <action name="assign_to_group">
 _   __      ___<settings>
_  _  _  _ _  _ _  _<type>assign_to_group</type>
_                 _ <label translate="true">