File tree 1 file changed +21
-0
lines changed 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
1499
1499
{
1500
1500
return $ this ->tempDocumentFilename ;
1501
1501
}
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
+ }
1502
1523
}
You can’t perform that action at this time.
0 commit comments