Feature #52217
closedHook for analyzing record
100%
Description
For checking my records from external api data it looks like im forced of using the class override method for retrieving the data. I
Can the function analyzeRecord() relocated inside the AbstractLinktype (and LinktypeInterface) class.
Or just make its possible to hook the analyzeRecord() method?
What would you suggest as the perfect solution?
Files
Updated by Xavier Perseguers about 11 years ago
- Status changed from New to Needs Feedback
Could you please describe a bit more what you try to do, linking to full class names and not only method names and possibly showing an example?
Updated by Benjamin Serfhos about 11 years ago
\TYPO3\CMS\Linkvalidator\LinkAnalyzer::analyzeRecord()
I want the link validator to analyze links from external content. We use TYPO3 as base CMS, with plugins that contains content from an internal API.
This means that the links are not in for example; bodytext.
I fixed it using an 'xclass':
$GLOBALS['TYPO3_CONF_VARS']['SYS']['Objects']['TYPO3\\CMS\\Linkvalidator\\LinkAnalyzer'] = array(
'className' => 'RSM\\RsmLinkvalidator\\RsmLinkAnalyzer',
);
This class only overrides the analyzeRecord() function.
First; When it matches tt_content and my list_type, the data is fetched from the cache or API. This will be stored $record['bodytext'].
After I manipulated the $record, I simply parse the parent function (parent::analyzeRecord($results, $table, $fields, $record)).
My suggestion is to manipulate the data using a hook; something like this:
I don't know if this is really the best way, but still this is a feature that really extends the possibilities of the nice extension.
Updated by Gerrit Code Review about 11 years ago
- Status changed from Needs Feedback to Under Review
Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/24276
Updated by Gerrit Code Review about 11 years ago
Patch set 2 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/24276
Updated by Benjamin Serfhos about 11 years ago
- File rsm_linkvalidator.zip rsm_linkvalidator.zip added
I now have a solution with extending the SoftReferenceParser.
Cause you asked for an example; here my working code.
It would still be nicer if we could preProcess the record before it renders all linktype classes.
Updated by Michael Stucki almost 11 years ago
- Project changed from 1510 to TYPO3 Core
- Category changed from Linkvalidator to Linkvalidator
Updated by Alexander Opitz almost 10 years ago
- Status changed from Under Review to Needs Feedback
- Target version deleted (
next-patchlevel)
Hi,
what is the state of this feature request and his patch?
Updated by Benjamin Serfhos almost 10 years ago
Hi Alexander,
The issue is still open for discussion. I needed a hook before the analyzeRecord. This can be entered inside the analyzeRecord() function or just inside the loop before executing the function.
I think its good to add several hooks to create the possiblity to add external generated data to be checked as well.
So what I had in mind, was checking on each record if the plugin is being configured, download all data and set it in bodytext to be sure it is being checked.
I love to hear some feedback regarding this topic. Am I the only one thinking this could improve the extension? :-)
Kind regards,
Benjamin
Updated by Gerrit Code Review almost 10 years ago
- Status changed from Needs Feedback to Under Review
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/24276
Updated by Gerrit Code Review almost 10 years ago
Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/24276
Updated by Gerrit Code Review almost 10 years ago
Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/24276
Updated by Gerrit Code Review almost 10 years ago
Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/24276
Updated by Gerrit Code Review almost 10 years ago
Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/24276
Updated by Gerrit Code Review almost 10 years ago
Patch set 8 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/24276
Updated by Gerrit Code Review over 9 years ago
Patch set 9 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/24276
Updated by Gerrit Code Review over 9 years ago
Patch set 10 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/24276
Updated by Gerrit Code Review over 9 years ago
Patch set 11 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/24276
Updated by Gerrit Code Review over 9 years ago
Patch set 12 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/24276
Updated by Gerrit Code Review over 9 years ago
Patch set 13 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/24276
Updated by Gerrit Code Review over 9 years ago
Patch set 14 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/24276
Updated by Gerrit Code Review over 9 years ago
Patch set 15 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/24276
Updated by Gerrit Code Review over 9 years ago
Patch set 16 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/24276
Updated by Gerrit Code Review over 9 years ago
Patch set 17 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/24276
Updated by Benjamin Serfhos over 9 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 26a94beab8707befbc3dee022cca2f4e6e40a6aa.