Attention

TYPO3 v7 has reached its end-of-life November 30th, 2018 and is not maintained by the community anymore. Looking for a stable version? Use the version switch on the top left.

There is no further ELTS support. It is recommended that you upgrade your project and use a supported version of TYPO3.

Static methods

When a given class calls one of its own static methods (or one from one of its parents), the code should use the self keyword instead of the class name.

Example

class MyClass
{
    public static function methodA()
    {
        //...
    }
    public static function methodB()
    {
        // instead of MyClass::methodA():
        self::methodA();
    }
}

Note that using static:: does not work in closures/lambda functions/anonymous functions.