PHP code example of justinholtweb / craft-alarmclock
1. Go to this page and download the library: Download justinholtweb/craft-alarmclock library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
justinholtweb / craft-alarmclock example snippets
use justinholtweb\alarmclock\services\Ticker;
use justinholtweb\alarmclock\events\TransitionEvent;
use yii\base\Event;
Event::on(Ticker::class, Ticker::EVENT_AFTER_TRANSITION, function(TransitionEvent $event) {
// Fires once, the first time a crossing is noticed.
// $event->transition, $event->element (null if it has since been deleted)
});