removeElement

removeElement

ADVANCED / PREMIUM BASIC

Removes elements in the PowerPoint presentation.

Description
public removeElement (array $referenceNode)
Parameters

referenceNode

An array to get the refence node.
The possible keys and values of this array are:

key Type Description
target string
  • slide (default value)
type string
  • audio
  • chart
  • diagram
  • image
  • paragraph
  • run
  • section
  • shape (text box) (default value)
  • slide
  • table
  • table-row
  • table-cell
  • table-cell-paragraph
  • video
contains string Contains a text string. For paragraph, run, shape, table, table-row, table-cell, table-cell-paragraph types.
occurrence mixed
  • (int) exact occurrence from 1
  • (array) occurrences
  • (string) range of contents (e.g.: 2..9, 2.., ..9), first(), last()
attributes array Contains a specific attribute key and value. Node or descendant attributes
parent string Immediate children (default as '/', any parent) or any other parent (a:tbl/, p:sp/...).
rootParent string Root parent. Default as p:spTree for slide elements and p:presentation for presentation elements.
customQuery string Custom XPath query, overwrites any other reference.
Exceptions

Method not available.

Code samples

Example #1

Example #2

Release notes
  • phppptx 3.5:
    • new method.