2016-03-15 75 views
0

,顧名思義,奏鳴曲管理員自定義列表操作調用錯誤的方法。索納塔管理員自定義列表操作調用錯誤的方法

有兩個管理類

  • AppleIdAdmin
  • ITunesGiftCardAdmin

還有其他兩個控制器:

  • PrintController
  • SMSController

每個管理類能夠發送SMS和打印使用在每個控制器中創建了兩個不同的方法的對象,

  • smsAppleIdAction
  • smsITunesAction
  • printAppleIdAction
  • printITunesAction

這裏是我的service.yml

services: 
    administration_product_product.admin.apple_id: 
     class: Administration\Product\ProductBundle\Admin\AppleIdAdmin 
     arguments: [~, Administration\Product\ProductBundle\Entity\AppleId, SonataAdminBundle:CRUD] 
     tags: 
      - {name: sonata.admin, manager_type: orm, group: Gift Cards, label: Apple ID} 

    administration_product_product.admin.sms_appleid: 
     class: Administration\Product\ProductBundle\Admin\AppleIdAdmin 
     tags: 
      - { name: sonata.admin, manager_type: orm, group: admin, label: Apple ID } 
     arguments: 
      - null 
      - Administration\Product\ProductBundle\Entity\AppleId 
      - AdministrationProductProductBundle:SMS 

    administration_product_product.admin.print_appleid: 
     class: Administration\Product\ProductBundle\Admin\AppleIdAdmin 
     tags: 
      - { name: sonata.admin, manager_type: orm, group: admin, label: Apple ID } 
     arguments: 
      - null 
      - Administration\Product\ProductBundle\Entity\AppleId 
      - AdministrationProductProductBundle:Print 

    administration_product_product.admin.i_tunes_gift_card: 
     class: Administration\Product\ProductBundle\Admin\ITunesGiftCardAdmin 
     arguments: [~, Administration\Product\ProductBundle\Entity\ITunesGiftCard, SonataAdminBundle:CRUD] 
     tags: 
      - { name: sonata.admin, manager_type: orm, group: Gift Cards, label: iTunes Gift Card } 

    administration_product_product.admin.print_itunes: 
     class: Administration\Product\ProductBundle\Admin\ITunesGiftCardAdmin 
     tags: 
      - { name: sonata.admin, manager_type: orm, group: admin, label: iTunes Gift Card } 
     arguments: 
      - null 
      - Administration\Product\ProductBundle\Entity\ITunesGiftCard 
      - AdministrationProductProductBundle:Print 
administration_product_product.admin.sms_itunes: 
    class: Administration\Product\ProductBundle\Admin\ITunesGiftCardAdmin 
    tags: 
     - { name: sonata.admin, manager_type: orm, group: admin, label: iTunes Gift Card } 
    arguments: 
     - null 
     - Administration\Product\ProductBundle\Entity\ITunesGiftCard 
     - AdministrationProductProductBundle:SMS 

奇怪的是,通過手機短信發送的Apple ID時(打印OK!)我得到這個錯誤:(!短信是確定)

Controller "Administration\Product\ProductBundle\Controller\PrintController::smsAppleIdAction" for URI "/admin/product/product/appleid/smsAppleId" is not callable. 

和打印的iTunes卡時,此錯誤顯示:

Controller "Administration\Product\ProductBundle\Controller\SMSController::printITunesAction" for URI "/admin/product/product/itunesgiftcard/printITunes" is not callable. 

也所有list_action樹枝文件都可以,他們調用正確的操作。

回答

0

好了,解決辦法是使用控制器每個管理員,並使用短信和打印方法,在此控制器。 不知道爲什麼,但它可以幫助別人。有一天:)

所以現在,我有AppleIdContollerITunesContoller,並且每個控制器包含適當的smsActionprintAction

相關問題