Project

General

Profile

Actions

Feature #17267

closed

Some Hooks for tslib_content

Added by Stefan Geith over 17 years ago. Updated over 14 years ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
Communication
Target version:
-
Start date:
2007-04-30
Due date:
% Done:

0%

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

Description

For extending stdWrap, getData and cObjGetSingle it would be nice to have some Hooks.
With these hooks, we could implement TypoScript features in 4.x that will come with 5.x (=TypoScript 2.0)

(1) cObjGetSingle
There is a hook, but it is usable only if the Name of the content Object is fixed.
If you e.g. want to log the usage of unexisting Object-Names, a hook in the default-part of the switch(object-name) is needed.

(2) stdWrap
To extend stdWrap, it would be good to have several hooks at different locations within stdWrap.

(3) getData (=getText)
A single hook at the end of getData() would be nice.


Patch against 4.2-dev R2308 is attached.

(issue imported from #M5536)


Files

Actions #1

Updated by Popy no-lastname-given over 17 years ago

I agree with Stefan : the only way to create custom cObject without XLCASS is to use obts... wich is and old and ugly extension (or to "simulate" it)

A hook there would be a nice solution :)

Actions #2

Updated by Martin Kutschker over 17 years ago

I say yes to the hooks for new objects, I wanted that for saome time myself. The hook for getData/getText is a good idea. But I don't think the hook for stdWrap is needed. It has already userFuncs and it's complicated enough as it is.

If any "backports" of TypoScript 2.0 will be done, I think it'll be part of the Core of 4.x. So in this case we won't need hooks for that.

Actions #3

Updated by Stefan Geith almost 17 years ago

Ingmar changed the patch to use interfaces instead of using method_exists().
And I commented the interfaces.
I uploaded it as 'feature-005536-cObj.patch'

Actions #4

Updated by Stefan Geith almost 17 years ago

I uploaded the extension T3X_sgtest_content_hook-0_0_0-z-200711241518.t3x for testing these hooks.

It includes the file 'demo_ts_for_testing.txt' that uses these functionality of these hooks.

Actions #5

Updated by Stefan Geith almost 17 years ago

Ingo moved the interfaces to typo3/sysext/cms/tslib/interfaces/ so I changed my Test-Plugin to use the new/changed interfaces.
I Uploaded the latest Versions of Patch and Test-Plugin:
T3X_sgtest_content_hook-0_1_0-z-200801111158.t3x
005536c-20080111-1200.diff

Works for me and I'm already using the getData-Hook and the cObjGetSingle-Hook.

Actions #6

Updated by Ingo Renner almost 17 years ago

committed to trunk

Actions

Also available in: Atom PDF