Note that there are some explanatory texts on larger screens.

plurals
  1. POOverwrite controller from vendors
    text
    copied!<p>i`m have bundle in my project vendors. Necessary overwrite EditController class. My vendor bundle build with help CedricLambardot AdminGeneratorBundle. I overwrite *-generator.yml and pointed params.bundle_name name my vendor bundle. Owerrite controller too, but him dont work, all the same symfony using controller from vendor.</p> <p>EditController.php from vendor:</p> <pre><code>namespace Acme\ProductBundle\Controller\Product; use Admingenerated\AcmeProductBundle\BaseProductController\EditController as BaseEditController; // ... class EditController extends BaseEditController { // ... } </code></pre> <p>Overwrited EditController.php</p> <pre><code>namespace Acme\AnniProductBundle\Controller\Product; use Acme\ProductBundle\Controller\Product\EditController as BaseEditController; // ... class EditController extends BaseEditController { // ... } </code></pre> <p>My overwrited *-generator.yml:</p> <pre><code>generator: admingenerator.generator.doctrine_odm params: model: Acme\AnniProductBundle\Document\Product namespace_prefix: Acme bundle_name: ProductBundle object_actions: delete: ~ fields: name: label: Name # ... # ... </code></pre> <p>My routes:</p> <pre><code>Acme_ProductBundle_Product_list: path: /product/ defaults: { _controller: AcmeAnniProductBundle:Product\List:index } Acme_ProductBundle_Product_filters: path: /product/filter defaults: { _controller: AcmeAnniProductBundle:Product\List:filter } Acme_ProductBundle_Product_edit: path: /product/{pk}/edit defaults: { _controller: AcmeAnniProductBundle:Product\Edit:index } Acme_ProductBundle_Product_update: path: /product/{pk}/update defaults: { _controller: AcmeAnniProductBundle:Product\Edit:update } Acme_ProductBundle_Product_object: path: /product/{pk}/{action} defaults: { _controller: AcmeAnniProductBundle:Product\Actions:object } Acme_ProductBundle_Product_new: path: /product/new defaults: { _controller: AcmeAnniProductBundle:Product\New:index } Acme_ProductBundle_Product_create: path: /product/create defaults: { _controller: AcmeAnniProductBundle:Product\New:create } </code></pre> <p><strong>What am I doing wrong?</strong></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload