IcingaObject: add hasBeenRenamed()...

...and a hint for IDE's
This commit is contained in:
Thomas Gelf 2017-09-14 10:20:45 +02:00
parent 9adc0e9087
commit 1e43ca5d99
1 changed files with 9 additions and 0 deletions

View File

@ -753,6 +753,15 @@ abstract class IcingaObject extends DbObject implements IcingaConfigRenderer
return $this->shouldBeRemoved; return $this->shouldBeRemoved;
} }
public function shouldBeRenamed()
{
return $this->hasBeenLoadedFromDb()
&& $this->getOriginalProperty('object_name') !== $this->getObjectName();
}
/**
* @return IcingaObjectGroups[]
*/
public function groups() public function groups()
{ {
$this->assertGroupsSupport(); $this->assertGroupsSupport();