ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
PHPExcel_Writer_Excel2007_RelsRibbon Class Reference
+ Inheritance diagram for PHPExcel_Writer_Excel2007_RelsRibbon:
+ Collaboration diagram for PHPExcel_Writer_Excel2007_RelsRibbon:

Public Member Functions

 writeRibbonRelationships (PHPExcel $pPHPExcel=null)
 Write relationships for additional objects of custom UI (ribbon) More...
 
- Public Member Functions inherited from PHPExcel_Writer_Excel2007_WriterPart
 setParentWriter (PHPExcel_Writer_IWriter $pWriter=null)
 Set parent IWriter object. More...
 
 getParentWriter ()
 Get parent IWriter object. More...
 
 __construct (PHPExcel_Writer_IWriter $pWriter=null)
 Set parent IWriter object. More...
 

Detailed Description

Definition at line 36 of file RelsRibbon.php.

Member Function Documentation

◆ writeRibbonRelationships()

PHPExcel_Writer_Excel2007_RelsRibbon::writeRibbonRelationships ( PHPExcel  $pPHPExcel = null)

Write relationships for additional objects of custom UI (ribbon)

Parameters
PHPExcel$pPHPExcel
Returns
string XML Output
Exceptions
PHPExcel_Writer_Exception

Definition at line 45 of file RelsRibbon.php.

References $objWriter, PHPExcel_Writer_Excel2007_WriterPart\getParentWriter(), PHPExcel_Shared_XMLWriter\STORAGE_DISK, and PHPExcel_Shared_XMLWriter\STORAGE_MEMORY.

45  {
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  }
getParentWriter()
Get parent IWriter object.
Definition: WriterPart.php:61
$objWriter
getRibbonBinObjects($What='all')
retrieve Binaries Ribbon Objects
Definition: PHPExcel.php:283
const STORAGE_MEMORY
Temporary storage method.
Definition: XMLWriter.php:46
+ Here is the call graph for this function:

The documentation for this class was generated from the following file: