Exemplo n.º 1
0
 public function testText()
 {
     $object = new TextElement();
     $this->assertEquals('', $object->getText());
     $this->assertInstanceOf('PhpOffice\\PhpPowerpoint\\Shape\\RichText\\TextElement', $object->setText());
     $this->assertEquals('', $object->getText());
     $this->assertInstanceOf('PhpOffice\\PhpPowerpoint\\Shape\\RichText\\TextElement', $object->setText('AAA'));
     $this->assertEquals('AAA', $object->getText());
 }
Exemplo n.º 2
0
 /**
  * Write hyperlink
  *
  * @param \PhpOffice\PhpPowerpoint\Shared\XMLWriter                               $objWriter XML Writer
  * @param \PhpOffice\PhpPowerpoint\AbstractShape|\PhpOffice\PhpPowerpoint\Shape\RichText\TextElement $shape
  */
 private function writeHyperlink(XMLWriter $objWriter, $shape)
 {
     // a:hlinkClick
     $objWriter->startElement('a:hlinkClick');
     $objWriter->writeAttribute('r:id', $shape->getHyperlink()->relationId);
     $objWriter->writeAttribute('tooltip', $shape->getHyperlink()->getTooltip());
     if ($shape->getHyperlink()->isInternal()) {
         $objWriter->writeAttribute('action', $shape->getHyperlink()->getUrl());
     }
     $objWriter->endElement();
 }