src/Contao/View/Contao2BackendView/ButtonRenderer.php
private function getChildIds(ModelInterface $model)
    {
        if (null === ($childCollections = $model->getMeta($model::CHILD_COLLECTIONS))) {
            return [];
        }

        $ids = [ModelId::fromModel($model)->getSerialized()];

        $childIds = [];
        foreach ($childCollections as $collection) {
            foreach ($collection as $child) {
                $childIds[] = $this->getChildIds($child);
            }
        }

        return \array_merge($ids, ...$childIds);
    }
private function getChildIds(ModelInterface $model)
    {
        if (null === ($childCollections = $model->getMeta($model::CHILD_COLLECTIONS))) {
            return [];
        }

        $ids = [ModelId::fromModel($model)->getSerialized()];

        $childIds = [];
        foreach ($childCollections as $collection) {
            foreach ($collection as $child) {
                $childIds[] = $this->getChildIds($child);
            }
        }

        return \array_merge($ids, ...$childIds);
    }
private function getChildIds ( ModelInterface $ model ) { if ( null === ( $ childCollections = $ model -> getMeta ( $ model :: CHILD_COLLECTIONS ) ) ) { return [ ] ; } $ ids = [ ModelId :: fromModel ( $ model ) -> getSerialized ( ) ] ; $ childIds = [ ] ; foreach ( $ childCollections as $ collection ) { foreach ( $ collection as $ child ) { $ childIds [ ] = $ this -> getChildIds ( $ child ) ; } } return \ array_merge ( $ ids , ... $ childIds ) ; }
Recursively determine all child ids of the passed model.

@param ModelInterface $model The model to fetch the ids from.

@return string[]
Recursively determine all child ids of the passed model .