PhpOffice\PhpPresentation\Writer\ODPresentation\Content::writeShapeComment PHP Method

writeShapeComment() public method

Write Comment
public writeShapeComment ( PhpOffice\Common\XMLWriter $objWriter, Comment $oShape )
$objWriter PhpOffice\Common\XMLWriter
$oShape PhpOffice\PhpPresentation\Shape\Comment
    public function writeShapeComment(XMLWriter $objWriter, Comment $oShape)
    {
        // officeooo:annotation
        $objWriter->startElement('officeooo:annotation');
        $objWriter->writeAttribute('svg:x', number_format(CommonDrawing::pixelsToCentimeters($oShape->getOffsetX()), 2, '.', '') . 'cm');
        $objWriter->writeAttribute('svg:y', number_format(CommonDrawing::pixelsToCentimeters($oShape->getOffsetY()), 2, '.', '') . 'cm');
        if ($oShape->getAuthor() instanceof Comment\Author) {
            $objWriter->writeElement('dc:creator', $oShape->getAuthor()->getName());
        }
        $objWriter->writeElement('dc:date', date('Y-m-d\\TH:i:s', $oShape->getDate()));
        $objWriter->writeElement('text:p', $oShape->getText());
        // ## officeooo:annotation
        $objWriter->endElement();
    }