Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Return Hook after a function
  • i would like to create menu pages using event.

    so when i call a function like
    $hook = add_menu_page(..........);

    an hook must be registered. and i have to call it as \Event::register('menu_$hook', function(){ add_sub_page(............);});

    as in wordpress way..

    any possibilities
  • Don't know.

    Wordpress is a CMS, an application, FuelPHP is an application framework, something to develop an application in. It does not have a concept of pages as you define it.
  • Dear,

    Harro,

    I asking i want to return a hook after a function. is it possible? how?

    if i create a widget, i want to trigger a hook with it, So that in future, i can use any data to show in the widget by registering event with it,

    summary?

    can i return a event to a variable?

  • Check the docs, defined events can return data, which is returned when the trigger() method is used to execute the events.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion