Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Integrate a Zend application into Drupal 6 / 7

Given a "nacked" Zend application - is it possible to use the Drupal based layout and navigation?

What is the best way to integrate a Zend application into Drupal 6 / Drupal 7?


For Example:

User X visits my Drupal page.

He wants to use the Zend-Application called "Feedback".

This "Feedback" application should be able to use the layout of the Drupal page.

Everything but the outer layout would be written in PHP using Zend.

like image 814
jantimon Avatar asked Aug 16 '10 13:08

jantimon


3 Answers

The module doesn't do Zend Framework app integration, it just allows you to use some of the ZF components (ie. Zend_Mail). I actually integrated a ZF app in Drupal 5, based on the Drake module (CakePHP integration).

It basically defines a Drupal menu with callbacks, these callbacks are passed to the ZF app (by including my zend bootstrap). Output of the ZF app is stored in a var (using the output buffering PHP functions), and I fetch the page title/js/css from the HTML, strip what isn't needed and then pass these back to Drupal (using drupal_set_title, drupal_add_js and drupal_set_html_head respectively). And yes, this is dirty, but it works for me...

like image 110
wimvds Avatar answered Nov 01 '22 01:11

wimvds


Not sure this is quite what you want, but you can take out $application->run() from the Zend app's index.php and then include that file in any other application and have access to all of the resources of the Zend Framework and the Zend app itself.

Probably still quite involved to get it to do what you want though.

like image 33
Gnuffo1 Avatar answered Nov 01 '22 02:11

Gnuffo1


Joomla has a "wrapper" layout option which just shove some url into an iframe in the layout. I use this a a lot to glue standalone applications to a corporate intranet at work, we just have to tailor stylesheets to match.

It's a quick and dirty path but get you there fast and users really don't care.

like image 1
Paulo Scardine Avatar answered Nov 01 '22 00:11

Paulo Scardine