Proposal PSR (Admin panel) => for CMS like magento ?

69 views
Skip to first unread message

Aurélien LEQUOY

unread,
Apr 6, 2014, 8:20:38 AM4/6/14
to php...@googlegroups.com
Hello,

For my framework (Glial) I developed what i think to be the best to make my admin pannel :


(screenshot extracted from : http://www.estrildidae.net/)



My goal :  (for my case)
- Be independant
- Plugable
- Easy install/remove bundle (you just remove the directory and you remove everything, the goal is not to look everywhere to delete/install what you need, exepct for database script for install/uninstall)


exemple of code for controller :

class User entends Controller
{
    public function UserAction()
    {
        //do some stuff
    }

    function tableAdmin()
    {

        //from using debugbacktrace
        if (from() === "administration.controller.php") {
           $module = array();
           $module['picture'] = "administration/tables.png"; //pic and text who will be displayed on admin panel
           $module['name'] = __("Tables");
           $module['description'] = __("Make the dictionary of field");  
           //add the possibility to add a special route ?

           return $module;
        }

        //the code of admin
}

On admin panel we use ReflectionClass to get Admin method



Final goal : (example)

use an admin tools of drupal in magento (working with on an example with DIC & mouf_php)

=> I think, it can have an hudge interest as composer/packagist with PSR-0 and PSR-4

Hugo HAMON

unread,
Apr 6, 2014, 9:02:50 AM4/6/14
to php...@googlegroups.com

Hi Aurélien,

What exactly is the purpose of your proposal?

As far as I have understood, you want to be able to have a standardized way of pluging admin tools in an interface. I don't think this is the target of the PHP-FIG. In my opinion, this is a very too specific need. The goal of the PHP-FIG is to provide standardized practices and interfaces that all frameworks and libraries may rely on.

Cheers.

Hugo.

--
You received this message because you are subscribed to the Google Groups "PHP Framework Interoperability Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to php-fig+u...@googlegroups.com.
To post to this group, send email to php...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/php-fig/ab8d696b-8bb0-49aa-8211-0200ab053288%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

 

Reply all
Reply to author
Forward
0 new messages