ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
RelsRibbon.php
Go to the documentation of this file.
1 <?php
37 {
45  public function writeRibbonRelationships(PHPExcel $pPHPExcel = null){
46  // Create XML writer
47  $objWriter = null;
48  if ($this->getParentWriter()->getUseDiskCaching()) {
50  } else {
52  }
53 
54  // XML header
55  $objWriter->startDocument('1.0','UTF-8','yes');
56 
57  // Relationships
58  $objWriter->startElement('Relationships');
59  $objWriter->writeAttribute('xmlns', 'http://schemas.openxmlformats.org/package/2006/relationships');
60  $localRels=$pPHPExcel->getRibbonBinObjects('names');
61  if(is_array($localRels)){
62  foreach($localRels as $aId=>$aTarget){
63  $objWriter->startElement('Relationship');
64  $objWriter->writeAttribute('Id', $aId);
65  $objWriter->writeAttribute('Type', 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/image');
66  $objWriter->writeAttribute('Target', $aTarget);
67  $objWriter->endElement();//Relationship
68  }
69  }
70  $objWriter->endElement();//Relationships
71 
72  // Return
73  return $objWriter->getData();
74 
75  }
76 
77 }
getParentWriter()
Get parent IWriter object.
Definition: WriterPart.php:61
$objWriter
writeRibbonRelationships(PHPExcel $pPHPExcel=null)
Write relationships for additional objects of custom UI (ribbon)
Definition: RelsRibbon.php:45
const STORAGE_MEMORY
Temporary storage method.
Definition: XMLWriter.php:46