Loading...
Skip navigation
Please note that this documentation is for the most recent version of this extension. It may not be relevant for older versions. Related documentation can be found in the documentation directory of the extension.

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' => [
            'exclude' => false,
            'label' => 'deleted',
            'config' => [
                'type' => 'check',
                'items' => [
                    '1' => [
                        '0' => 'Record is deleted'
                    ]
                ],
            ],
        ],
    ],
];

Contact request

You can contact us at any time

Stop! Playing in the meantime?
Stop! Playing in the meantime?
Stop! Playing in the meantime?

Stop! Playing in the meantime?

Break the highscore

Press Start
Contact request
Screenreader label
Security question
R2P_________EAB______
C_C____X____U_____RPL
1_X___R7T___854______
9_A____5______W___W4G
D4C_________BYC______