PHPackages                             yii1tech/ar-softdelete - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. yii1tech/ar-softdelete

ActiveLibrary[Database &amp; ORM](/categories/database)

yii1tech/ar-softdelete
======================

Provides support for ActiveRecord soft delete in Yii1

1.0.0(2y ago)35BSD-3-ClausePHPPHP &gt;=7.1

Since Jul 11Pushed 2y ago1 watchersCompare

[ Source](https://github.com/yii1tech/ar-softdelete)[ Packagist](https://packagist.org/packages/yii1tech/ar-softdelete)[ GitHub Sponsors](https://github.com/klimov-paul)[ Patreon](https://www.patreon.com/klimov_paul)[ RSS](/packages/yii1tech-ar-softdelete/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (2)Used By (0)

 [ ![](https://avatars.githubusercontent.com/u/134691944) ](https://github.com/yii1tech)

Application Runtime Configuration Extension for Yii 1
=====================================================

[](#application-runtime-configuration-extension-for-yii-1)

This extension provides support for Yii1 ActiveRecord soft delete.

For license information check the [LICENSE](LICENSE.md)-file.

[![Latest Stable Version](https://camo.githubusercontent.com/ec1c63aafe39be0639305dc3b01c7167610bfdfc006a6a2bcdbd4fcc52854ccd/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f79696931746563682f61722d736f667464656c6574652e737667)](https://packagist.org/packages/yii1tech/ar-softdelete)[![Total Downloads](https://camo.githubusercontent.com/f3a21516502f162092619e0162dbdc3a99baf13fdcb86402898e67425a1637eb/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f79696931746563682f61722d736f667464656c6574652e737667)](https://packagist.org/packages/yii1tech/ar-softdelete)[![Build Status](https://github.com/yii1tech/ar-softdelete/workflows/build/badge.svg)](https://github.com/yii1tech/ar-softdelete/actions)

Installation
------------

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
php composer.phar require --prefer-dist yii1tech/ar-softdelete

```

or add

```
"yii1tech/ar-softdelete": "*"
```

to the "require" section of your composer.json.

Usage
-----

[](#usage)

This extension provides support for so called "soft" deletion of the ActiveRecord, which means record is not deleted from database, but marked with some flag or status, which indicates it is no longer active, instead.

This extension provides `\yii1tech\ar\softdelete\SoftDeleteBehavior` ActiveRecord behavior for such solution support in Yii1. You may attach it to your model class in the following way:

```
