moveElement

moveElement

ADVANCED / PREMIUM BASIC

Moves elements in the PowerPoint presentation.

Description
public moveElement (array $referenceNode, array $referenceNodeTo)
Parameters

referenceNode

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

key Type Description
target string
  • slide (default value)
type string
  • audio
  • image
  • shape (text box) (default value)
  • slide
  • table
  • video
contains string Contains a text string. For shape, table 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.

referenceNodeTo

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

key Type Description
target string
  • slide (default value)
type string
  • slide (default value)
contains string Contains a text string. For shape, table types.
occurrence mixed
  • (int) exact occurrence from 1
  • (string) first(), last(). Default as 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.