Task #49575

Split up typolink() functionality in multiple methods

Added by Benni Mack almost 6 years ago. Updated 8 months ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2013-07-02
Due date:
% Done:

100%

TYPO3 Version:
6.2
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

The cObj->typolink() method is one of the biggest code chunks in the CMS core, and one of the most central ones for the frontend. However, it is hard to test, debug and understand. That's why certain separate parts can be split up in multiple methods.

The first step provides the following changes:

  • More readable variables within the method
  • Split up the detection, whether it is a mail link, external url in a separate method
  • Split up the string explode functionality of "23 - myclass" into a separate method

Related issues

Related to TYPO3 Core - Task #50484: Generating URLs takes very long Needs Feedback 2013-07-27
Related to TYPO3 Core - Bug #67199: Wrong parameter passer to linkhandler hook Closed 2015-05-29

Associated revisions

Revision 8ce47d4a (diff)
Added by Benni Mack over 4 years ago

[TASK] Split up typolink() functionality in multiple methods - Part 1

The cObj->typolink() method is one of the biggest code chunks in
the CMS core, and one of the most central ones for the frontend.
However, it is hard to test, debug and understand. That's why certain
separate parts can be split up in multiple methods.

The first step provides the following changes:

  • More readable variables within the method
  • Split up the detection, whether it is a mail link,
    external url etc in a separate method
  • Split up the string explode functionality of "23 - myclass"
    into a separate method

There are unit tests missing. Also, resolving each link type
could be put in a separate method as well in a further step.

Resolves: #49575
Releases: master
Change-Id: I40fe9367d65d6f6b7a857f5972765d1c2eb561ca
Reviewed-on: http://review.typo3.org/21785
Reviewed-by: Markus Klein <>
Tested-by: Markus Klein <>
Reviewed-by: Stefan Neufeind <>
Reviewed-by: Tymoteusz Motylewski <>
Tested-by: Tymoteusz Motylewski <>
Reviewed-by: Alexander Opitz <>
Tested-by: Alexander Opitz <>
Reviewed-by: Benjamin Mack <>
Tested-by: Benjamin Mack <>

History

#1 Updated by Gerrit Code Review almost 6 years ago

  • Status changed from New to Under Review

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

#2 Updated by Gerrit Code Review about 5 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/21785

#3 Updated by Gerrit Code Review about 5 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/21785

#4 Updated by Gerrit Code Review about 5 years ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/21785

#5 Updated by Gerrit Code Review about 5 years ago

Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/21785

#6 Updated by Gerrit Code Review about 5 years ago

Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/21785

#7 Updated by Gerrit Code Review almost 5 years ago

Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/21785

#8 Updated by Gerrit Code Review over 4 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/21785

#9 Updated by Gerrit Code Review over 4 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/21785

#10 Updated by Gerrit Code Review over 4 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/21785

#11 Updated by Benni Mack over 4 years ago

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

#12 Updated by Benni Mack 8 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF