Skip to content

Commit 04e396b

Browse files
committed
feat: Include parent context in usage monitor when dealing with Nestable content
1 parent 40b36a5 commit 04e396b

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/Cdn/Monitor/ObjectIsInColumn.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
use Nails\Common\Helper\Model\Where;
1616
use Nails\Common\Model\Base;
1717
use Nails\Common\Resource\Entity;
18+
use Nails\Common\Traits\Model\Nestable;
1819
use Nails\Factory;
1920

2021
abstract class ObjectIsInColumn implements Monitor
@@ -111,6 +112,10 @@ protected function createDetail(Entity $oEntity, Base $oModel, array $aAdditiona
111112
'label' => $this->getEntityLabel($oEntity),
112113
];
113114

115+
if (classUses($oModel, Nestable::class)) {
116+
$aDetails['nested_under'] = json_decode($oEntity->{$oModel->getBreadcrumbsColumn()});
117+
}
118+
114119
if (!$oModel->isDestructiveDelete()) {
115120
$aDetails[$oModel->getColumnIsDeleted()] = $oEntity->{$oModel->getColumnIsDeleted()};
116121
}

0 commit comments

Comments
 (0)