ssossossossosso

Forums

Covering OroCRM topics, including community updates and company announcements.  Subscribe

Forums Forums OroPlatform Extending UserController Method Error

This topic contains 3 replies, has 2 voices, and was last updated by  Rodolfo 2 years, 10 months ago.

  • Creator
    Topic
  • #31102

    Rodolfo
    Participant

    Hi Oro Friends,

    Please a I need a help to extend this method: https://github.com/orocrm/platform/blob/master/src/Oro/Bundle/UserBundle/Controller/UserController.php#L177-L197

    I tried using ‘$output = parent::view();’ but didn’t work. So I decided to try copying all the logic from the original method.
    So, what am I doing wrong?

    My error is:
    Strict standards: Declaration of Acme\Bundle\TestBundle\Controller\UserController::view() should be compatible with Oro\Bundle\UserBundle\Controller\UserController::view(Oro\Bundle\UserBundle\Entity\User $entity, $editRoute = ”) in /www/orocrm/src/Acme/Bundle/TestBundle/Controller/UserController.php on line 8

    And

    Unable to generate a URL for the named route “oro_user_security_login” as such route does not exist.
    500 Internal Server Error – RouteNotFoundException

    Thanks guys!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Author
    Replies
  • #31103

    Rodolfo
    Participant

    Hello!
    I managed to solve the problem with the follow code:

    And oro/routing.yml

    #31104

    Yevhen Shyshkin
    Participant

    Hello, Rodolfo.

    That’s great! As for routing inheritance – we’ve added precise file reference, so now you shouldn’t use direct path – instead you should use relative precise path (@!OroUserBundle/Controller). This week there will be a webinar about bundle extension – this feature will be introduced there.

    #31105

    Rodolfo
    Participant

    Thank you @yshyshkin

    I’ll be there!

    Rodolfo

Viewing 3 replies - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.