Skip to content

Commit

Permalink
Dev: fix whole … getDynamicId and method_exists
Browse files Browse the repository at this point in the history
  • Loading branch information
Shnoulle committed Oct 6, 2018
1 parent e5427b5 commit fd7911f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions application/models/Dynamic.php
Expand Up @@ -50,4 +50,7 @@ public static function create($id, $scenario = 'insert')
return new $className($scenario);
}

public function getDynamicId() {
return $this->dynamicId;
}
}
4 changes: 2 additions & 2 deletions application/models/behaviors/PluginEventBehavior.php
Expand Up @@ -50,7 +50,7 @@ private function _dispatchDynamic($when,$what) {
{
$oPluginEvent = new PluginEvent($when.get_parent_class($this->owner).$what, $this);
$oPluginEvent->set('model', $this->owner);
$oPluginEvent->set('dynamicId', $this->owner->dynamicId);
$oPluginEvent->set('dynamicId', $this->owner->getDynamicId());
return App()->getPluginManager()->dispatchEvent($oPluginEvent);
}
}
Expand All @@ -66,7 +66,7 @@ public function dispatchPluginModelEvent($sEventName, $criteria = null)
{
$oPluginEvent = new PluginEvent($sEventName, $this);
$oPluginEvent->set('model', $this->owner);
if(method_exists('getSurveyId',$this->owner)) {
if(method_exists($this->owner,'getSurveyId')) {
$oPluginEvent->set('iSurveyID', $this->owner->getSurveyId());
$oPluginEvent->set('surveyId', $this->owner->getSurveyId());
}
Expand Down

1 comment on commit fd7911f

@Shnoulle
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Arg why travis get issue here : tested LanguageChangerTest::testBasic : seems OK …

Please sign in to comment.