eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter\PageConverter::addNewNotEmptyXmlElement PHP Method

addNewNotEmptyXmlElement() private method

Utility method to add new elements to an xml node if their value is not empty.
private addNewNotEmptyXmlElement ( DOMDocument $dom, DOMElement $node, string $name, string $value )
$dom DOMDocument xml document
$node DOMElement where to add the new element
$name string of the new element
$value string of the new element
    private function addNewNotEmptyXmlElement(DOMDocument $dom, DOMElement $node, $name, $value)
    {
        if (!empty($value)) {
            $this->addNewXmlElement($dom, $node, $name, $value);
        }
    }