Project

General

Profile

Actions

Bug #67274

closed

initializeObject() called before dependency injection

Added by Morton Jonuschat almost 9 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Extbase
Target version:
Start date:
2015-06-03
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
5.5
Tags:
Complexity:
Is Regression:
No
Sprint Focus:
Stabilization Sprint

Description

Given typical extbase controller actions:

    public function listAction() {
        $records = $this->modelRepository->findAll();
        $this->view->assign('records', $records);
    }

    public function showAction(Model $model) {
        $this->view->assign('model', $model);
    }

The method initializeObject() on the Models is called before the dependency injection has been performed. According to http://wiki.typo3.org/Dependency_Injection#initializeObject.28.29_as_object_lifecycle_method `initializeObject()` is called after DI has been done.

Tested on 6.2.12


Related issues 3 (0 open3 closed)

Related to TYPO3 Core - Bug #67272: initializeObject() not called for Extbase Domain ModelClosed2015-06-03

Actions
Related to TYPO3 Core - Bug #61044: AbstractDomainObject::__wakeup() method should not call initializeObject method internallyClosedDaniel Hürtgen2014-08-18

Actions
Related to TYPO3 Core - Bug #67401: Document "DI is now done before initializeObject" as important .rstClosed2015-06-10

Actions
Actions

Also available in: Atom PDF