[TYPO3-mvc] How to extend the felogin extension?

Jigal van Hemert jigal.van.hemert at typo3.org
Fri Sep 6 21:23:34 CEST 2013


Hi,

On 6-9-2013 17:19, Stefan Kruse wrote:
> How can I use xclass to extend some functions from this extension.
>
> I found:
>
> GLOBALS -> SYS -> Objects: But how does it work exactly?

Maybe the easiest way is to use an example:

For 4.7 and lower:

// XCLASS for Page module
$GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/cms/layout/db_layout.php'] 
= t3lib_extMgm::extPath('MyExt') . 'Classes/class.ux_db_layout.php';

This uses the information in the line that is at the bottom of the 
script you want to XCLASS.

For 6.0 and higher the mechanism has changed. The fully qualified class 
name is the base for the XCLASS mechanism.

// Namespace XCLASS
$GLOBALS['TYPO3_CONF_VARS']['SYS']['Objects']['TYPO3\\CMS\\Backend\\Controller\\PageLayoutController'] 
= array('className' => 'ux_SC_db_layout');

Instead of providing the path to the PHP file we just have to give the 
class name. If you use namespaces (this example used an old style class 
name to be compatible with both 4.x and 6.x) you should provide the 
fully qualified class name.

-- 
Jigal van Hemert
TYPO3 CMS Active Contributor

TYPO3 .... inspiring people to share!
Get involved: typo3.org


More information about the TYPO3-project-typo3v4mvc mailing list