10750[FEATURE] Add Hook into t3lib_befunc::getPageForRootline
Commit message
Review
-
Code review CR 0
-
Verified V 0
Files 1
Review log 19
-
Kay Strobach commented on patch set 1 03/04/13, 08:33
Abandoned wrong fixes line! -
Kay Strobach commented on patch set 1 03/04/13, 08:33
Restored -
Kay Strobach uploaded patch set 2 03/04/13, 08:33
-
Kay Strobach uploaded patch set 3 03/04/13, 08:33
-
Stefan Neufeind commented on patch set 4 03/04/13, 08:33
Looks good to me, but someone else must approve @Kay: yes, that's what interfaces are used for :-) Somebody please decide if we go with or without using an interface. But despite that it looks fine imho. -
Xavier Perseguers commented on patch set 4 03/04/13, 08:33
(1 inline comment) This patch should be rewritten for master (6.1) anywayclass.t3lib_befunc.php:399&$row will cause a PHP warning -
Xavier Perseguers uploaded patch set 5 03/04/13, 08:33
-
Georg Ringer commented on patch set 4 03/04/13, 08:33
Verified; Looks good to me, but someone else must approve -
Kay Strobach commented on patch set 4 03/04/13, 08:33
so what do you expect and interface for t3lib_befunc_HookName? -
Kay Strobach commented on patch set 4 03/04/13, 08:33
mhmm, looking into [1] shows a very big drawback: if i want to use one hook, i need to implement many functions if the interface is used ... :( [1] http://git.typo3.org/TYPO3v4/Core.git?a=blob;f=t3lib/interfaces/interface.t3lib_browselinkshook.php;h=deb49ba9c0a5741a59a606297f3e4f2430ce8eba;hb=HEAD -
Kay Strobach uploaded patch set 4 03/04/13, 08:33
-
Andy Grunwald commented on patch set 4 03/04/13, 08:33
"Newer" hooks (like this) are implemented with an interface, isn`t it? -
Andy Grunwald commented on patch set 4 03/04/13, 08:33
Yes. In t3lib/interfaces (http://git.typo3.org/TYPO3v4/Core.git?a=tree;f=t3lib/interfaces;h=4f33f7942101bbdd2e6af777922e7c205b3e9fbc;hb=HEAD) you can find some examples. -
Mr. Jenkins commented on patch set 1 03/04/13, 08:33
Build Successful https://ci.typo3.org/job/typo3-v4-core-gerrit/3831/ : SUCCESS -
Mr. Jenkins commented on patch set 3 03/04/13, 08:33
Build Successful https://ci.typo3.org/job/typo3-v4-core-gerrit/3833/ : SUCCESS -
Mr. Jenkins commented on patch set 4 03/04/13, 08:33
Build Successful https://ci.typo3.org/job/typo3-v4-core-gerrit/3834/ : SUCCESS -
Mr. Jenkins commented on patch set 5 03/04/13, 08:33
Build Successful https://ci.typo3.org/job/typo3-v4-core-gerrit/7614/ : SUCCESS -
Wouter Wolters commented on patch set 4 03/04/13, 08:33
Looks good to me, but someone else must approve -
Kay Strobach commented on patch set 5 03/04/13, 08:33
Abandoned there is a better way in the core to inject pagers. I do currently use an xclass, which can be easily converted into a hook: class ux_t3lib_TSparser_TSconfig extends t3lib_TSparser_TSconfig{ /** * Parses the passed TS-Config using conditions and caching * * @param string $TStext: The TSConfig being parsed * @param string $type: The type of TSConfig (either "userTS" or "PAGES") * @param integer $id: The uid of the page being handled * @param array $rootLine: The rootline of the page being handled * @return array Array containing the parsed TSConfig and a flag wheter the content was retrieved from cache * @see t3lib_TSparser */ public function parseTSconfig($TStext, $type, $id = 0, array $rootLine = array()) { // @todo add caching here! /** * @var Tx_Themes_Domain_Repository_SkinRepository */ $skinRepository = t3lib_div::makeInstance('Tx_Themes_Domain_Repository_SkinRepository'); $skin = $skinRepository->findByPageOrRootline($id); if($skin !== NULL) { $buffer = $skin->getTSConfig() . "\n\n[GLOBAL]\n\n" . $TStext; return parent::parseTSconfig($buffer, $type, $id, $rootLine); } else { return parent::parseTSconfig($TStext, $type, $id, $rootLine); } } }