PHPackages                             putyourlightson/craft-element-status-events - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. putyourlightson/craft-element-status-events

ActiveYii2-extension[Utility &amp; Helpers](/categories/utility)

putyourlightson/craft-element-status-events
===========================================

Element status events extension for Craft CMS.

2.0.1(4y ago)121.0kMIT

Since Jan 15Compare

[ Source](https://github.com/putyourlightson/craft-element-status-events)[ Packagist](https://packagist.org/packages/putyourlightson/craft-element-status-events)[ Docs](https://github.com/putyourlightson/craft-element-status-events)[ RSS](/packages/putyourlightson-craft-element-status-events/feed)WikiDiscussions Synced 2d ago

READMEChangelogDependencies (1)Versions (8)Used By (0)

Element Status Events for Craft CMS 3
=====================================

[](#element-status-events-for-craft-cms-3)

The Element Status Events extension provides events that are triggered whenever an element’s status changes. It is intended to be used a helper component for other Craft modules and plugins.

To get an understanding of how the module works, read the [Challenge #6 – The Chicken or the Egg](https://craftcodingchallenge.com/challenge-6-the-chicken-or-the-egg) solution.

Requirements
------------

[](#requirements)

This extension requires Craft CMS 3.0.0 or later.

Usage
-----

[](#usage)

Install it manually using composer or add it as a dependency to your plugin.

```
composer require putyourlightson/craft-element-status-events

```

If you work with scheduled Entries (future published or expired), make sure to set up cron that calls:

```
php craft element-status-events/scheduled

```

Events
------

[](#events)

Whenever an element’s status is changed, `ElementStatusEvents::EVENT_STATUS_CHANGED` is fired. The `StatusChangeEvent` object provides information about the change.

```
use putyourlightson\elementstatusevents\ElementStatusEvents;
use putyourlightson\elementstatusevents\events\StatusChangeEvent;

// ...

Event::on(
    ElementStatusEvents::class,
    ElementStatusEvents::EVENT_STATUS_CHANGED,
    function(StatusChangeEvent $event) {
        $oldStatus   = $event->statusBeforeSave;
        $newStatus   = $event->element->getStatus();
        $isLive      = $event->changedToPublished();
        $isDeath     = $event->changedToUnpublished();
        $isScheduled = $event->changedTo('pending');
    }
);
```

License
-------

[](#license)

This extension is licensed for free under the MIT License.

Created by [PutYourLightsOn](https://putyourlightson.com/) in cooperation with [Oliver Stark](https://github.com/ostark)

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 50% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~171 days

Recently: every ~298 days

Total

8

Last Release

1526d ago

Major Versions

1.3.0 → 2.0.02019-03-28

### Community

Maintainers

![](https://www.gravatar.com/avatar/59428c6783d02d74c8778d9953ba84c35d3877ece53f5eb393689c052a9c97e4?d=identicon)[putyourlightson](/maintainers/putyourlightson)

---

Top Contributors

[![bencroker](https://avatars.githubusercontent.com/u/57572400?v=4)](https://github.com/bencroker "bencroker (1 commits)")[![jamesmacwhite](https://avatars.githubusercontent.com/u/8067792?v=4)](https://github.com/jamesmacwhite "jamesmacwhite (1 commits)")

---

Tags

eventscmsstatusCraftcraftcmselement

### Embed Badge

![Health badge](/badges/putyourlightson-craft-element-status-events/health.svg)

```
[![Health](https://phpackages.com/badges/putyourlightson-craft-element-status-events/health.svg)](https://phpackages.com/packages/putyourlightson-craft-element-status-events)
```

###  Alternatives

[craftcms/feed-me

Import content from XML, RSS, CSV or JSON feeds into entries, categories, Craft Commerce products, and more.

292943.4k27](/packages/craftcms-feed-me)[verbb/formie

The most user-friendly forms plugin for Craft.

100387.6k58](/packages/verbb-formie)[nystudio107/craft-seomatic

SEOmatic facilitates modern SEO best practices &amp; implementation for Craft CMS 5. It is a turnkey SEO system that is comprehensive, powerful, and flexible.

1741.5M52](/packages/nystudio107-craft-seomatic)[verbb/navigation

Create navigation menus for your site.

92698.4k18](/packages/verbb-navigation)[verbb/events

A full-featured plugin for event management and ticketing.

2311.8k](/packages/verbb-events)[verbb/workflow

Enforce multi-step review processes for creating entries.

138123.0k1](/packages/verbb-workflow)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
