<?php

/*
 * PuzzleApp
 * Webemyos
 * Jérôme Oliva
 * GNU Licence
 */

namespace Apps\Blog\Helper;

use Apps\EeApp\Entity\EeAppAdmin;
use Core\Core\DataBase;


/**
 * Helper for Send Email
 * Send Base Email or by Email App
 * @author jerome
 */
class WorkFlowHelper 
{
    public static function Run($core, $trigger, $data) {

        $app = \Apps\EeApp\Helper\AppHelper::HaveApp($core, "Workflow");

        if($app != false){
            $appPath = "\Apps\\" .$app->Name->Value . "\\". $app->Name->Value;  
            $workflow = new $appPath($core);
            return $workflow->Start($trigger, $data);
        } else {
            return false;
        }
    }
}