Download the PHP package lekoala/silverstripe-softdelete without Composer

On this page you can find all versions of the php package lekoala/silverstripe-softdelete. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package silverstripe-softdelete

SilverStripe Soft Delete Module

Add a soft delete behaviour to your dataobjects. Objects are simply marked as deleted and kept in the database.

Soft delete will follow the same permissions patterns as delete.

ModelAdmin and SecurityAdmin are extended to add a new GridField action that replace the default delete action

This module depends on lekoala/silverstripe-cms-actions for displaying delete buttons

How to use

Simply replace your calls from delete to softDelete.

New extensions hooks are provided to avoid side effects (onBeforeSoftDelete, onAfterSoftDelete). These are ideals if you have child records that need to be soft deleted with their parent.

Config options

You can configure:

Prevent accidental deletion

By default, the module will prevent any delete from happening. To allow deletion, you must set

The only way from the CMS UI to delete a record is to go to a soft deleted record and click "Really delete" which will call "forceDelete" on the record.

Disable filtering

You can disable filtering globally, using

Or at query level

Filtering on ids

By default, this module will let you return soft deleted records if you ask them specifically by ID. This is by design to prevent things breaking accidentally. If you want to make sure you don't display soft deleted records, make sure to implement a proper canView() method that fits your usage.

An alternative option, is to disable that feature:

Keep in mind that DataObject::get_by_id(); can get cached and it can lead to tricky scenarios.

Compatibility

Tested with 4.4+

Maintainer

LeKoala - [email protected]


All versions of silverstripe-softdelete with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4 || ^8
silverstripe/recipe-plugin Version ^1 || ^2
silverstripe/vendor-plugin Version ^1 || ^2
silverstripe/framework Version ^4.4 || ^5
lekoala/silverstripe-cms-actions Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package lekoala/silverstripe-softdelete contains the following files

Loading the files please wait ....