Change behavior of action_url& notes_url properties

This commit is contained in:
Yonas Habteab 2021-09-09 14:41:42 +02:00
parent 3fd1a2370d
commit 89d7aac1c9
2 changed files with 14 additions and 0 deletions

View file

@ -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);

View file

@ -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);