Automattic\WooCommerce\EmailEditorVendor\Sabberworm\CSS
OutputFormatter::comments
- @param array<Commentable> $aComments
- @return string
Метод класса: OutputFormatter{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
$OutputFormatter = new OutputFormatter(); $OutputFormatter->comments( $oCommentable );
- $oCommentable(Commentable) (обязательный)
- .
Код OutputFormatter::comments() OutputFormatter::comments WC 11.3.0
public function comments(Commentable $oCommentable)
{
if (!$this->oFormat->bRenderComments) {
return '';
}
$sResult = '';
$aComments = $oCommentable->getComments();
$iLastCommentIndex = count($aComments) - 1;
foreach ($aComments as $i => $oComment) {
$sResult .= $oComment->render($this->oFormat);
$sResult .= $i === $iLastCommentIndex ? $this->spaceAfterBlocks() : $this->spaceBetweenBlocks();
}
return $sResult;
}