Automattic\WooCommerce\Vendor\Sabberworm\CSS\RuleSet
DeclarationBlock::render
Method of the class: DeclarationBlock{}
No Hooks.
Returns
String.
Usage
$DeclarationBlock = new DeclarationBlock(); $DeclarationBlock->render( $oOutputFormat );
- $oOutputFormat(OutputFormat|null) (required)
- .
DeclarationBlock::render() DeclarationBlock::render code WC 10.4.3
public function render($oOutputFormat)
{
$sResult = $oOutputFormat->comments($this);
if (count($this->aSelectors) === 0) {
// If all the selectors have been removed, this declaration block becomes invalid
throw new OutputException(
'Attempt to print declaration block with missing selector',
$this->getLineNumber()
);
}
$sResult .= $oOutputFormat->sBeforeDeclarationBlock;
$sResult .= $oOutputFormat->implode(
$oOutputFormat->spaceBeforeSelectorSeparator() . ',' . $oOutputFormat->spaceAfterSelectorSeparator(),
$this->aSelectors
);
$sResult .= $oOutputFormat->sAfterDeclarationBlockSelectors;
$sResult .= $oOutputFormat->spaceBeforeOpeningBrace() . '{';
$sResult .= $this->renderRules($oOutputFormat);
$sResult .= '}';
$sResult .= $oOutputFormat->sAfterDeclarationBlock;
return $sResult;
}