Git Product home page Git Product logo

Comments (3)

florine2623 avatar florine2623 commented on June 7, 2024

ping @PrestaShop/tech-council
Could you take a look at that request ?
Thanks !

from prestashop.

Hlavtox avatar Hlavtox commented on June 7, 2024

Hi @gurkcity, I get your point, but this hook was added mostly for the purpose of adding custom routes. Why do you need to alter these variables?

I think that this should work, no?

public function hookActionAfterLoadRoutes($params) {
        // Add or replace any route
        $params['dispatcher']->addRoute(
            'my_fancy_controller_rule_name', // Route id
            'element', // url rule
            'my_fancy_controller', // controller
            1, // id lang
            [], // keywords
            ['fc' => 'module', 'module' =>'testmodule'], // params
            1 // id shop
        );
    }

from prestashop.

gurkcity avatar gurkcity commented on June 7, 2024

Hi @Hlavtox
thanks for looking into this.
I understand you if you are only interested in changing the routes. But our idea is to have more flexibility for a rewrite module that wants to find the correct controller not by default PS regex but by other way e.g. database query in selected tables. For this reason we must set the controller in this place. There is no other place suitable for this idea for a complete free set of rewrite rules.

from prestashop.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.