Skip to content

Instantly share code, notes, and snippets.

@fiedsch
Last active August 29, 2015 14:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fiedsch/9aaad75e36da6242b896 to your computer and use it in GitHub Desktop.
Save fiedsch/9aaad75e36da6242b896 to your computer and use it in GitHub Desktop.
search all Contao Hooks
#/bin/bash
# Alle Hooks aus Contao suchen
#WEBROOT=/your/web/root/directory
WEBROOT=/Users/andreas/Sites
# ROOT Verzeichnis einer Contao Installation
TL_ROOT=$WEBROOT/contao3.2
hooks=$(grep -R "foreach (\$GLOBALS\['TL_HOOKS'\]" $TL_ROOT | cut -d"'" -f4 | sort | uniq)
for hook in $hooks
do
echo "HOOK $hook found in"
grep -Rl "\['$hook'\]" $TL_ROOT
echo ""
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment