- Debugging

parent 48e3c1fc
...@@ -35,7 +35,6 @@ class CheckClickingOnTheLink extends ConditionBase implements ConditionInterface ...@@ -35,7 +35,6 @@ class CheckClickingOnTheLink extends ConditionBase implements ConditionInterface
$param = TriggerParam::find()->where(['condition_id' => $this->model->id, 'key' => 'link'])->one(); $param = TriggerParam::find()->where(['condition_id' => $this->model->id, 'key' => 'link'])->one();
// Если параметр есть, он длиннее нуля и не равен # // Если параметр есть, он длиннее нуля и не равен #
if (!is_null($param) && strlen($param->value)>0 && $param->value!='#') { if (!is_null($param) && strlen($param->value)>0 && $param->value!='#') {
print($param->value.' : '.$message->email);
// Если идентификатор кампании в сообщении не равен нулю // Если идентификатор кампании в сообщении не равен нулю
if (!is_null($message->campaign_id)) { if (!is_null($message->campaign_id)) {
// Создаем объект унисендера // Создаем объект унисендера
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
namespace common\modules\triggers\controllers; namespace common\modules\triggers\controllers;
use common\modules\triggers\models\TriggerCondition;
use Yii; use Yii;
use common\modules\triggers\components\conditions\Conditions; use common\modules\triggers\components\conditions\Conditions;
use common\modules\triggers\components\conditions\vendor\ConditionBase; use common\modules\triggers\components\conditions\vendor\ConditionBase;
...@@ -48,6 +49,7 @@ class TriggerAdminController extends AdminController { ...@@ -48,6 +49,7 @@ class TriggerAdminController extends AdminController {
public function actionTesting(){ public function actionTesting(){
$trigger = \common\modules\triggers\components\conditions\conditions\CheckClickingOnTheLink::init(); $trigger = \common\modules\triggers\components\conditions\conditions\CheckClickingOnTheLink::init();
$trigger->model = TriggerCondition::find()->where(['id' => 11])->one();
$model = \common\modules\triggers\models\TriggerSchedule::find()->where(['id'=>22])->one(); $model = \common\modules\triggers\models\TriggerSchedule::find()->where(['id'=>22])->one();
$trigger->check($model); $trigger->check($model);
// return $this->render( // return $this->render(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment