File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed
Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -1499,4 +1499,25 @@ public function getTempDocumentFilename(): string
14991499 {
15001500 return $ this ->tempDocumentFilename ;
15011501 }
1502+
1503+ /**
1504+ * Delete Table
1505+ *
1506+ * Below function will take $search Parameter as an Input and remove Respective table from format
1507+ *
1508+ * @param string $search
1509+ * return void
1510+ */
1511+ public function deleteTable (string $ search ): void
1512+ {
1513+ $ search = self ::ensureMacroCompleted ($ search );
1514+ $ tagPos = strpos ($ this ->tempDocumentMainPart , $ search );
1515+ if ($ tagPos ) {
1516+ $ tableStart = $ this ->findTableStart ($ tagPos );
1517+ $ tableEnd = $ this ->findTableEnd ($ tagPos );
1518+
1519+ // Delete the entire table
1520+ $ this ->tempDocumentMainPart = $ this ->getSlice (0 , $ tableStart ) . $ this ->getSlice ($ tableEnd );
1521+ }
1522+ }
15021523}
You can’t perform that action at this time.
0 commit comments