Comment::hasChild()

Does this comment have the given child comment?

Available since version 3.0.149.

Usage

// basic usage
$bool = $comment->hasChild($comment);

// usage with all arguments
$bool = $comment->hasChild($comment, bool $recursive = true);

Arguments

NameType(s)Description
$commentint Comment

Comment or Comment ID

$recursive (optional)bool

Check all descending children recursively? Use false to check only direct children. Default:true

Return value

bool


Comment methods and properties

API reference based on ProcessWire core version 3.0.252