Project

General

Profile

Actions

Feature #52217

closed

Hook for analyzing record

Added by Benjamin Serfhos over 10 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Linkvalidator
Target version:
-
Start date:
2013-09-24
Due date:
% Done:

100%

Estimated time:
PHP Version:
Tags:
Complexity:
Sprint Focus:

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

rsm_linkvalidator.zip (6.79 KB) rsm_linkvalidator.zip Extension that retrieves content from external data using the SoftReferenceParser hook Benjamin Serfhos, 2013-10-04 13:06
Actions #1

Updated by Xavier Perseguers over 10 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?

Actions #2

Updated by Benjamin Serfhos over 10 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:

http://pastebin.com/4FvkYw2c

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.

Actions #3

Updated by Gerrit Code Review over 10 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

Actions #4

Updated by Gerrit Code Review over 10 years ago

Patch set 2 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/24276

Actions #5

Updated by Benjamin Serfhos over 10 years ago

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.

Actions #6

Updated by Michael Stucki over 10 years ago

  • Category set to Linkvalidator
Actions #7

Updated by Michael Stucki over 10 years ago

  • Project changed from 1510 to TYPO3 Core
  • Category changed from Linkvalidator to Linkvalidator
Actions #8

Updated by Alexander Opitz about 9 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?

Actions #9

Updated by Benjamin Serfhos about 9 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

Actions #10

Updated by Gerrit Code Review about 9 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

Actions #11

Updated by Gerrit Code Review about 9 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

Actions #12

Updated by Gerrit Code Review about 9 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

Actions #13

Updated by Gerrit Code Review about 9 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

Actions #14

Updated by Gerrit Code Review about 9 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

Actions #15

Updated by Gerrit Code Review about 9 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

Actions #16

Updated by Gerrit Code Review about 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

Actions #17

Updated by Gerrit Code Review about 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

Actions #18

Updated by Gerrit Code Review almost 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

Actions #19

Updated by Gerrit Code Review almost 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

Actions #20

Updated by Gerrit Code Review almost 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

Actions #21

Updated by Gerrit Code Review almost 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

Actions #22

Updated by Gerrit Code Review over 8 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

Actions #23

Updated by Gerrit Code Review over 8 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

Actions #24

Updated by Gerrit Code Review over 8 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

Actions #25

Updated by Benjamin Serfhos over 8 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #26

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF