Skip to main navigation Skip to main content Skip to page footer

Delete data records

This guide covers how to add frontend management as a TYPO3-Extension-Developer for real estate records to an extension. The key parameters are:

  • Extension-Key: openimmo
  • Objekt-Name: Immobilie

Deleting records

Records are deleted from the record list. Delete buttons in the list are configured as follows:

plugin.tx_openimmopro.settings.lists.immobilie {
    # ...
    actions {
        delete {
            label =
            title = Delete this object
            action = Delete
            iconIdentifier = actions-delete
            confirmation = Really delete this object?!
        }
    }
}

The records will be marked as deleted and so the methods getDeleted und setDeleted need to be defined in the object model.

class Immobilie extends AbstractEntity
{

    /**
     * @var bool
     */
    protected $deleted = true;

    /**
     * @return bool
     */
    public function getDeleted(): bool
    {
        return $this->deleted;
    }

    /**
     * @return bool
     */
    public function isDeleted(): bool
    {
        return $this->deleted;
    }

    /**
     * @param bool $deleted
     */
    public function setDeleted(bool $deleted): void
    {
        $this->deleted = $deleted;
    }

}

A deleted field will need to be defined in the TCA:

$GLOBALS['TCA']['tx_extension_domain_model_object'] = [
    'columns' => [
        'deleted' => [
            'config' => [
                'type' => 'passthrough',
            ],
        ],
    ],
];
Shopping basket 0 Products

The Demo is build with*

EXT:bootstrap_package for site-package aka theme build on Bootsrap 5.

EXT:modules for user plugins like user-profile, registration, user-addresses, and more.

EXT:shop for the whole shop functionality.

EXT:questions for the FAQ page and FAQs attached in the product detail views.

EXT:glossaries for the glossaries and definitions.

EXT:fluid_fpdf for generating invoices, delivery-notes, product-sheets and more.

EXT:parsedown_extra for rendering the extension documentations from markdown to HTML.

* There are only build-in settings made using site-settings & TypoScript – no templates or other files were changed or overridden!