Feature #82986

Epic #86307: Extbase allows to fetch deleted/hidden records (respects ignoreEnableFields)

Extbase Model - includeDeleted and ignoreEnableFields

Added by Reindl Bernd about 4 years ago. Updated about 3 years ago.

Status:
New
Priority:
Must have
Assignee:
-
Category:
Extbase
Target version:
-
Start date:
2017-11-13
Due date:
% Done:

0%

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

Description

Hello,

sometimes it is required to load also deleted Objects. With an Repository this is allready supportet by the QuerySettings setIncludeDeleted and setIgnoreEnableFields.

But if you need the deleted items on a relation property within a model, there is no option for.

So i modified 3 core classes (see attached files) to add the ability to load deleted and hidden (enable columns) objects.

@includeDeleted includes deleted objects for the property
@ignoreEnableFields ignores the enable fields for the property

    /**
     * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\VENDOR\Extension\Domain\Model\Material>
     * @includeDeleted
     */
    protected $material;
    /**
     * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\VENDOR\Extension\Domain\Model\Material>
     * @ignoreEnableFields
     */
    protected $material;

At the moment i use the "config.tx_extbase.objects" typoscript path to override the core classes with an extension where the modifications are located. But this can cause problems when the core files where updated. So is it possible to implement this feature into the core?


Files

Files.zip (3.48 KB) Files.zip Reindl Bernd, 2017-11-13 16:10

Related issues

Related to TYPO3 Core - Bug #83179: getSysLanguageStatement builder does not respect enable fieldsNew2017-11-30

Actions
#1

Updated by Tymoteusz Motylewski about 3 years ago

  • Related to Bug #83179: getSysLanguageStatement builder does not respect enable fields added
#2

Updated by Tymoteusz Motylewski about 3 years ago

  • Parent task set to #86307

Also available in: Atom PDF