totten / civicrm-symfony

CiviCRM-Symfony Integration
MIT License
6 stars 2 forks source link

Integration with Sonata admin #1

Open ravindrakhokharia opened 11 years ago

ravindrakhokharia commented 11 years ago

I am new to civicrm. can you guide me how can i integrate civicrm with sonata admin ?

totten commented 11 years ago

That is some uncharted territory. Hope you're ambitious. ;)

I'm still a novice with Symfony and can't provide detailed guidance on Sonata Admin. However, it looks like Sonata has support for a few different data-layers (SQL, MongoDB, PHPCR):

http://sonata-project.org/bundles/admin/master/doc/index.html

One option is to create a new Symfony SE app and port Civi's schema to Doctrine ORM -- and then use the existing Doctrine ORM feature in Sonata Admin. This app would access Civi's DB. However, the app would be basically independent -- it wouldn't work with any of the finer data-validation, data-flows, or business-logic. (For example, sometimes when entity X is modified, one needs to notify a third-party module which will then update entity Y.)

Another tempting option would be to enhance Sonata Admin by introducing support for a new, fourth data-layer -- the CiviCRM Public API. The API provides CRUD and reflection (e.g. "getEntities", "getFields", "getActions") and works with Civi's normal validation/processing. At a high-level, that should be enough to enable a scaffolding tool like Sonata Admin (although the devil is in the details). You can find some more information about the API here:

http://wiki.civicrm.org/confluence/display/CRMDOC43/API+Reference

In any case, let me know more about your use-case and about what you find/produce when investigating these options. It would be great to share that with other developers in the community.

ravindrakhokharia commented 11 years ago

hi i am getting issue with auto loading class when try to run your bundle can you please guide what i need to change as drupal with civicrm is running fine. but i can't get success with running this bundle.

ravindrakhokharia commented 11 years ago

Hi, I move ahead with autoloading now i have a new problem getting following error. "You need to define CIVICRM_DSN in civicrm.settings.php" but i checked the file CIVICRM_DSN is already defined and also its working fine from drupal.

can you guide me what can be the issue. thanks for your support.