shared login system between sylius and other part of the symfony app? - symfony

I am new to Symfony and Sylius, and I have installed Sylius which is installed as a symfony "vendor" bundle by default.
I have moved the route to Sylius (which is accessible by default at "/") to "/shop", and I will developp myself the home page and other pages (not related to the shop, like information pages, etc.)
But, I need authentication in these other pages to manage user accounts (with data not related to the shop).
What I would like is a shared authentication system, but I don't know if it is possible to use Sylius' one and how to do this.
Thanks for you help !
Jon

THis is related to Symfony, you will need to override security in way to share context - your app and Sylius. Then some parts of Sylius will be locked as now.
http://symfony.com/doc/current/security.html

What I have made is route my Bundle under "/admin/blog". As my route is under /admin, I have to authenticate with the Sylius authentication, and it Seems to work well ! :-)

Related

Dynamic linking to Wordpress database

I intend to use WP to setup a freelancers website (similar to oDesk) to connect service providers with service seekers in a WEB 2.0 dynamic environment. This site requires multiple forms to enter and retrieve information using database and show them in filtered or non-filtered views in separate pages.
Please advise if there are available plugins to expedite developing this site, or otherwise any guidance would be appreciated. I specifically would like to know how to connect forms to database and then how to retrieve this information from the DB.
Regards,
You are likely going to have to create your own custom WordPress theme, using various custom PHP pages to connect your web forms to your database. I think your project is well beyond the scope of a simple WP plugin.
If this was my project, I'd ditch WordPress and go for something custom built in Rails. WordPress is a good enough CMS, but it isn't really a good fit for what you are looking to accomplish.

Plugin System for symfony2

Is there a known tutorial that shows how to create a plugin system for symfony2?
Something like the big cms' have, a folder in the root directory where you can place your plugins.
Google just made a fool with me because the symfony1 bundles were called "plugins".
I imagine plugins to be just bundles, but not in the src but in the new plugins one.
They should be registered at runtime.
I believe you can use Event Dispatcher from Symfony to achive want you want. The below link might help you.
http://symfony.com/doc/master/components/event_dispatcher/introduction.html
I don't have any guide to explain how to use this for plugin system as I am personally looking for it.

Starting a multisite Symfony CMF Instance

I am checking to see if there are any recommendations on creating a multisite instance of the Symfony CMF.
My initial thoughts are to launch with Symfony 2.2 and would like to rapidly adopt the CMF once it becomes stable. If there are any known best practices to allow this, please let me know.
The CMF for now has no special support for multisite. The route document however does map the hostname field so multi-domain routing should already work.
Unless you want to mix the routes from all domains, you would want to separate the routes tree by domain and build something into the route provider to handle the domain name. A pull request on the cmf RoutingBundle would definitely be appreciated.

Integrate an existing Symfony2 application with Drupal 7?

The future development of my symfony2 project
( which is actually more or less a static website with an authentification system )
would be to provide authentified users a CMS to easily edit text and images / import files / create pages / give acces to their pages as the website grows and evolves.
I have been thinking implementing my project with Drupal would be way forward .
how can i proceed ?
Is doing the reverse better?
what are other options?
I am not sure what you mean by 'the reverse', but there is a Symfony module available for D7. I would suggest setting up a Drupal test bed and seeing about integrating your site into drupal.
It is my understanding that Symfony2 has gone into core in D8, but D8 is probably a long way from initial release.

Zend Framework installed. Wordpress being installed in sub-folder. How do I carry over Zend user authentication to WP pages?

I am working on a website with the Zend framework installed. Zend controls the user authentication (logged in, logged out, who they are, etc.).
I want to install Wordpress into a sub-folder and access the proper user data (username, logged in/out status, etc.) when viewing the pages/posts created by Wordpress.
What steps would I need to take to do this?
NOTE: The programmer before me installed and used Zend, I am familiar with Zend, but not so much the details so you might need to explain in more laymen terms. I've used Wordpress lots of times and know it quite well.
Somewhere in Wordpress (you likely know where since you are familiar with Wordpress), you will use the following Zend Framework code:
$auth = Zend_Auth::getInstance();
if ($auth->hasIdentity()) {
// Identity exists; get it
$identity = $auth->getIdentity();
}
The above code is checking the session namespace and determining if an identity has been stored. If there is an identity stored, someone has authenticated and you can retrieve that authorized identity.
The above code assumes that you can load classes with the Zend_ namespace prefix from wordpress (autoload, include_path, etc.).

Resources