GithubHelp home page GithubHelp logo

Comments (11)

susannemoog avatar susannemoog commented on August 15, 2024 1

fyi the adminpanel extended displays hooks and signals and input values given (https://packagist.org/packages/psychomieze/adminpanel-extended) and could be used as a start point / reference.

from typo3cms-reference-coreapi.

lolli42 avatar lolli42 commented on August 15, 2024 1

Another note ;) It becomes relatively likely that core v10 changes both signals and hooks: psr-14 "Event manager" is basically a hook interface, this PSR is not yet officially released but is stabilizing. It is pretty likely that we'll use that and substitute both signals+hooks with that approach in v10. Thus, I'm not too sure if a full signal/hook reference is still worth the effort at the moment. If anyone still finds spare time and picks this topic up, it wouldn't hurt, though.

from typo3cms-reference-coreapi.

DanielSiepmann avatar DanielSiepmann commented on August 15, 2024

Yeah that's an old one by myself. As far as I know this will come to the core in the near future? Don't ask me where I did hear that.

Anyway it would be to much work to create such a list by hand. What do you think @sypets @marble?

from typo3cms-reference-coreapi.

sypets avatar sypets commented on August 15, 2024

I don't have enough information what the current status is. If that is in any way possible, it would be cool to be able to autogenerate a list.

from typo3cms-reference-coreapi.

sypets avatar sypets commented on August 15, 2024

Finding hooks:

Resources:

As a crude method for generating list of hooks, this works:

grep -r -F "['SC_OPTIONS'][" typo3/sysext/ | grep -v ext_localconf | grep -v Test | grep -v "/Documentation" | perl -p -e "s/.*(\[\'SC_OPTIONS\'\])(\[(\'.*\'|[^ ]*::class|\\$.*)\])+.*/\1\2/" | grep -v "\\$" | sort -u

results: hooklist-typo3-9.3-dev.txt

The extension dmc_hooklist is outdated.

Another method is to browse through the changelogs:

Finding signals

from typo3cms-reference-coreapi.

DanielSiepmann avatar DanielSiepmann commented on August 15, 2024

That can't fully work. Some classes save the hooks in an internal variable and reuse them on multiple places. This way it's just not possible, without parsing all php files, to generate a full list of all hooks.

But still that might provide a nearly complete list which might be better than nothing.

from typo3cms-reference-coreapi.

lolli42 avatar lolli42 commented on August 15, 2024

With the discussion in coredev channel https://typo3.slack.com/archives/C03AM9R17/p1526392541000230 in mind, I'd opt to close the issue for now.

from typo3cms-reference-coreapi.

sypets avatar sypets commented on August 15, 2024

As an alternative for closing this ticket, I would like the section on finding hooks / signals to be improved a little bit: https://docs.typo3.org/typo3cms/CoreApiReference/ApiOverview/Hooks/Concept/Index.html?highlight=hooks%20signals#finding-signals

If this can be improved with minimal effort and / or some links to already existing information added, it might be helpful.

If I understood correctly, Daniel is willing to handle this.

Details:

  • "but they are easily found by searching the TYPO3 core for dispatch(." I would slightly disagree on the easily. For generating the list: Yes, you can find them but the output should be formatted to be helpful.
  • The text says: "For finding hooks, look into the next chapter Hook configuration.". But the next chapter does not really mention finding hooks. I guess, it's kind of obvious you can search for SC_OPTIONS, but then at least write it in the corresponding section.

from typo3cms-reference-coreapi.

sypets avatar sypets commented on August 15, 2024

Related: #15

from typo3cms-reference-coreapi.

lolli42 avatar lolli42 commented on August 15, 2024

Well, I'd argue that using a hook / signal usually forces to read the source that emits the signal / calls a hook anyway: The input and output values are almost always unique and specially crafted for this single place, a developer who wants to use a hook has to take a look at the implementation in detail. Having a (manual?) reference of hooks / signals thus won't help that much, if you're looking for something to slot/hook in, you have to know the according handling core side class already. So, a general "how a hook / signal usually works" documentation is needed, but I guess an (incomplete? / outdated?) list of hooks / signals is of very limited use. Thus, I'd still to close this issue. Maybe we find some generic solution with a new API in place, this should also consolidate the possible options, and reduce for instance the different hook incarnations (there are 3 or 4 different basic types), too.

from typo3cms-reference-coreapi.

lolli42 avatar lolli42 commented on August 15, 2024

Had a quick talk with Sybille on this recently. We'll close that issue: It is unlikely we'll come up with a hooks / signal+slot reference anytime soon.

from typo3cms-reference-coreapi.

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.