protected function filter_onlychild() { if ($this->parent === null) { return false; } else { return $this->parent->childCount(true) === 1; } }