OroPlatform Forums

Covering OroPlatform topics, including community updates and company announcements.

This topic contains 7 replies, has 2 voices, and was last updated by  Kamil 6 years, 4 months ago.

Starting from March 1, 2020 the forum has been switched to the read-only mode. Please head to StackOverflow for support.

  • Creator
  • #35716


    Hi guys,
    after lots of fighting with installation I finally got the platform running.
    Got through initial examples like bundles, menu, own doctrine entities. Sadly I’m quite new to symphony maybe my question will be simple if so, please let me know what I should write in google (or just give me few links) so that I can educate myself.

    I’ve a datagrid showing data previously entered by hand to DB. Everything works.
    How should I now create crud for it? I tried to analyse the code from crm, a bit too much at one time. I saw other posts on forum that you use rest for communication.

    Please, just few simple links to help me get started.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Author
  • #35717
    Yevhen Shyshkin
    Yevhen Shyshkin

    Hello, Kamil.

    Try to look at simple example – BusinessUnit entity in OroOrganizatuin bundle (Oro/Bundle/OrganizationBundle/EntityBusinessUnit).

    Create, Read (view) and Update are performed through controller (Oro/Bundle/OrganizationBundle/Controller/BusinessUnitController) that has appropriate actions. Additional index action used to render grid of all entities. Each action renders with appropriate template in Resources directory (Oro/Bundle/OrganizationBundle/Resources/views/BusinessUnit/*.html.twig). Appropriate form type used to render create/update form (Oro/Bundle/OrganizationBundle/Form/Type/BusinessUnitType.php), and handler used to process this form (Oro/Bundle/OrganizationBundle/Form/Handler/BusinessUnitHandler).

    Delete should be performed through REST API in appropriate controller action (Oro/Bundle/OrganizationBundle/Controller/Api/Rest/BusinessUnitController).



    Hi Yevhen,
    going through the simple example you have shown to me.
    I’ve recreated most of the sample.
    Now I’m fighting with view part.
    It constantly wants from ID

    Variable “id” does not exist in /var/www/platform-application/vendor/oro/platform/src/Oro/Bundle/UIBundle/Resources/views/actions/view.html.twig at line 139

    I thought I need to set up the id in content data block sadly it didn’t help…

    as you see I try to understand the view logic step by step

    Yevhen Shyshkin
    Yevhen Shyshkin

    You set id with {% set id = ‘businessUnitView’ %} and it should be enough.

    Are you sure that your controller action uses this template? To test that you can replace whole content_data with some test data. I just tested exactly the same template and it worked for BusinessUnit.

    Template usually defined in controller action annotation (see https://github.com/orocrm/platform/blob/master/src/Oro/Bundle/OrganizationBundle/Controller/BusinessUnitController.php#L39). See Symfony documentation http://symfony.com/doc/current/bundles/SensioFrameworkExtraBundle/annotations/view.html. Remember that if you using short annotation (without file name) then template directory must have name the same to controller name.



    I had @Template but the whole path is correctly made.
    Damn this symphony is starting irritating me.
    I’ve tried to force different Template and even use the $this->render to force it. Somehow it constantly returns to the

    Frankly I don’t know how to check which view was used. Even when I forced different templates without

    nothing changes, yes I clear cache I even added
    cache: false

    to app/config/config.yml



    one problem was issue with syncing files with server…

    finally got through this problem
    now I’ll start going through rest of view template



    Another point of failure
    I’m trying to make the update function to start working. Sadly it heavily uses services.yml
    No matter how much I try to get this file to work (I even now work only on one parameter) I get this info:

    I tried many things:
    acme_new.test.class: Acme\Bundle\NewBundle\AcmeNewBundle

    as I looked through configuration I should be able to write even nothing.class:
    and it should start working.

    What am I doing wrong this time? Is there any way of debugging it?



    solved, indentation

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

The forum ‘OroPlatform – How do I? Questions’ is closed to new topics and replies.

You will be redirected to [title]. Would you like to continue?

Yes No