Files
ultimatemember/classes/actions/ActionScheduler_CanceledAction.php
T
Yurii Nalivaiko 797bc2fd98 Squashed 'includes/lib/action-scheduler/' content from commit c82834771
git-subtree-dir: includes/lib/action-scheduler
git-subtree-split: c828347715e6c3318c8ab8b4fea2d87b31d51aac
2024-09-03 12:28:53 +02:00

26 lines
882 B
PHP

<?php
/**
* Class ActionScheduler_CanceledAction
*
* Stored action which was canceled and therefore acts like a finished action but should always return a null schedule,
* regardless of schedule passed to its constructor.
*/
class ActionScheduler_CanceledAction extends ActionScheduler_FinishedAction {
/**
* Construct.
*
* @param string $hook Action's hook.
* @param array $args Action's arguments.
* @param null|ActionScheduler_Schedule $schedule Action's schedule.
* @param string $group Action's group.
*/
public function __construct( $hook, array $args = array(), ActionScheduler_Schedule $schedule = null, $group = '' ) {
parent::__construct( $hook, $args, $schedule, $group );
if ( is_null( $schedule ) ) {
$this->set_schedule( new ActionScheduler_NullSchedule() );
}
}
}