From 89d7aac1c9dafb1bb2011f0ee5c2e68c59f085cb Mon Sep 17 00:00:00 2001 From: Yonas Habteab Date: Thu, 9 Sep 2021 14:41:42 +0200 Subject: [PATCH] Change behavior of `action_url`& `notes_url` properties --- library/Icingadb/Model/ActionUrl.php | 7 +++++++ library/Icingadb/Model/NotesUrl.php | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/library/Icingadb/Model/ActionUrl.php b/library/Icingadb/Model/ActionUrl.php index 0245fe85..61186233 100644 --- a/library/Icingadb/Model/ActionUrl.php +++ b/library/Icingadb/Model/ActionUrl.php @@ -4,6 +4,8 @@ namespace Icinga\Module\Icingadb\Model; +use Icinga\Module\Icingadb\Model\Behavior\ActionAndNoteUrl; +use ipl\Orm\Behaviors; use ipl\Orm\Model; use ipl\Orm\Relations; @@ -35,6 +37,11 @@ class ActionUrl extends Model ]; } + public function createBehaviors(Behaviors $behaviors) + { + $behaviors->add(new ActionAndNoteUrl(['action_url'])); + } + public function createRelations(Relations $relations) { $relations->belongsTo('environment', Environment::class); diff --git a/library/Icingadb/Model/NotesUrl.php b/library/Icingadb/Model/NotesUrl.php index 0b299df3..6cc3c2b1 100644 --- a/library/Icingadb/Model/NotesUrl.php +++ b/library/Icingadb/Model/NotesUrl.php @@ -4,6 +4,8 @@ namespace Icinga\Module\Icingadb\Model; +use Icinga\Module\Icingadb\Model\Behavior\ActionAndNoteUrl; +use ipl\Orm\Behaviors; use ipl\Orm\Model; use ipl\Orm\Relations; @@ -35,6 +37,11 @@ class NotesUrl extends Model ]; } + public function createBehaviors(Behaviors $behaviors) + { + $behaviors->add(new ActionAndNoteUrl(['notes_url'])); + } + public function createRelations(Relations $relations) { $relations->belongsTo('environment', Environment::class);