Skip to content

Commit afc58c0

Browse files
devX2712Progi1984
authored andcommitted
ADD Property 'status' reading and writing
ADD the 'status' properties for reading and wrinting into the document
1 parent 5aecc8d commit afc58c0

File tree

3 files changed

+36
-1
lines changed

3 files changed

+36
-1
lines changed

src/PhpPresentation/DocumentProperties.php

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,14 @@ class DocumentProperties
116116
private $customProperties = [];
117117

118118
/**
119-
* Create a new \PhpOffice\PhpPresentation\DocumentProperties.
119+
* status
120+
*
121+
* @var string
122+
*/
123+
private $status;
124+
125+
/**
126+
* Create a new \PhpOffice\PhpPresentation\DocumentProperties
120127
*/
121128
public function __construct()
122129
{
@@ -132,6 +139,7 @@ public function __construct()
132139
$this->category = '';
133140
$this->company = 'Microsoft Corporation';
134141
$this->revision = '';
142+
$this->status = '';
135143
}
136144

137145
/**
@@ -479,4 +487,27 @@ public function setRevision(string $pValue = ''): self
479487

480488
return $this;
481489
}
490+
491+
/**
492+
* Get Status
493+
*
494+
* @return string
495+
*/
496+
public function getStatus()
497+
{
498+
return $this->status;
499+
}
500+
501+
/**
502+
* Set Status
503+
*
504+
* @param string $pValue
505+
* @return \PhpOffice\PhpPresentation\DocumentProperties
506+
*/
507+
public function setStatus($pValue = '')
508+
{
509+
$this->status = $pValue;
510+
511+
return $this;
512+
}
482513
}

src/PhpPresentation/Reader/PowerPoint2007.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,7 @@ protected function loadDocumentProperties(string $sPart): void
229229
'/cp:coreProperties/dcterms:created' => 'setCreated',
230230
'/cp:coreProperties/dcterms:modified' => 'setModified',
231231
'/cp:coreProperties/cp:revision' => 'setRevision',
232+
'/cp:coreProperties/cp:contentStatus' => 'setStatus',
232233
);
233234
$oProperties = $this->oPhpPresentation->getDocumentProperties();
234235
foreach ($arrayProperties as $path => $property) {

src/PhpPresentation/Writer/PowerPoint2007/DocPropsCore.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,9 @@ public function render(): ZipInterface
7373
// cp:revision
7474
$objWriter->writeElement('cp:revision', $this->oPresentation->getDocumentProperties()->getRevision());
7575

76+
// cp:contentStatus
77+
$objWriter->writeElement('cp:contentStatus', $this->oPresentation->getDocumentProperties()->getStatus());
78+
7679
// cp:category
7780
$objWriter->writeElement('cp:category', $this->oPresentation->getDocumentProperties()->getCategory());
7881

0 commit comments

Comments
 (0)