I have a CakePHP application that should take data from Drupal (6). In particular, there is one custom content type and one web form that must be shared using CakePHP, so when a new node is added for this type of content or the submitted web form, Cake knows about it. I'm not sure how to do this, I came up with two approaches:
- Availability of an alternative data source for the considered models and reading directly from the Drupal database. However, Drupal tables are in Drupally format, and I would rather not write a lot of $ this-> Model-> find () s for - it will be a little painful. I don’t quite understand where Drupal is.
- Writing code in Drupal to save data in a different format in the CakePHP database. I don't know how easy it will be - I am more prepared for success with Cake than with Drupal. I think I would use hook_form_alter and add a function to the $ form [#submit] array?
Does anyone have any advice which of these two would be better, or if there is another option? I am inclined to the second idea.
Help rate, thanks
source
share