Bug #91677

Exbase Domain Model __construct not called

Added by This M├Ąchler 26 days ago. Updated 26 days ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
Extbase
Target version:
-
Start date:
2020-06-18
Due date:
% Done:

0%

TYPO3 Version:
10
PHP Version:
7.2
Tags:
__construct constructor domain model extbase
Complexity:
Is Regression:
Sprint Focus:

Description

In my domain model class, the constructor is never called. If I write something like this, nothing happens (no php error, $bla->blu() doesn't exist:

public function __construct( ) {
  $bla->blu();
}

It seems that the domain objects are cloned:

public function __clone( ) {
  $bla->blu();
}

This leads to an error: "Call to a member function blu() on null"
In the documentation, the __constructor is falsely mentioned. Or I get something wrong:

https://docs.typo3.org/m/typo3/book-extbasefluid/master/en-us/5-Domain/2-implementing-the-domain-model.html

History

#1 Updated by Oliver Hader 26 days ago

  • Category changed from Documentation to Extbase

Also available in: Atom PDF