You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
631 B
PHP
33 lines
631 B
PHP
<?php
|
|
|
|
namespace Elementor\Modules\Announcements\Classes;
|
|
|
|
use Elementor\Modules\Announcements\Triggers\{
|
|
IsFlexContainerInactive, AiStarted
|
|
};
|
|
|
|
if ( ! defined( 'ABSPATH' ) ) {
|
|
exit; // Exit if accessed directly.
|
|
}
|
|
|
|
class Utils {
|
|
/**
|
|
* get_trigger_object
|
|
*
|
|
* @param $trigger
|
|
*
|
|
* @return IsFlexContainerInactive|false
|
|
*/
|
|
public static function get_trigger_object( $trigger ) {
|
|
//@TODO - replace with trigger manager
|
|
switch ( $trigger['action'] ) {
|
|
case 'isFlexContainerInactive':
|
|
return new IsFlexContainerInactive();
|
|
case 'aiStared':
|
|
return new AiStarted();
|
|
default:
|
|
return false;
|
|
}
|
|
}
|
|
}
|