PluginProbe
Depicter — Popup & Slider Builder / 1.9.2
Depicter — Popup & Slider Builder v1.9.2
4.8.1 trunk 1.0.0 1.1.0 1.1.2 1.1.4 1.1.6 1.1.7 1.1.8 1.1.9 1.2.0 1.3.0 1.3.1 1.3.2 1.3.3 1.3.5 1.3.8 1.5.0 1.5.1 1.5.2 1.5.5 1.6.0 1.6.1 1.6.2 1.7.0 All 76 releases
← All changes | app/src/Document/Manager.php +18 -1 1.3.01.9.2 View file →
@@ -130,10 +130,18 @@
130 130 }
131 131
132 132 $editorDataArray->startSection = $startSection;
133 133
134 + // make document model base on editor data
134 135 $mapper = new Mapper();
135 - return $mapper->hydrate( $editorDataArray, $documentId )->get();
136 + $documentModel = $mapper->hydrate( $editorDataArray, $documentId )->get();
137 +
138 + // set document entity properties
139 + $documentModel->setDocumentId( $documentId );
140 + $documentModel->setUnpublishedNotice( $documentId );
141 + $documentModel->setEntityProperty( 'status', $this->getStatus( $documentId ) );
142 +
143 + return $documentModel;
136 144 }
137 145
138 146 /**
139 147 * Retrieves custom css file of a document if exists
@@ -155,5 +163,14 @@
155 163 return false;
156 164 }
157 165
158 166
167 + /**
168 + * Get status of document
169 + *
170 + * @param int $documentID
171 + * @return string
172 + */
173 + public function getStatus( $documentID ) {
174 + return \Depicter::document()->repository()->getStatus( $documentID );
175 + }
159 176 }