addTextBoxConnector

addTextBoxConnector

ADVANCED / PREMIUM BASIC

Inserts a text box connector into the PowerPoint presentation.

Description
public addTextBoxConnector($position, array $connection, array $options = array())

This method inserts text box connectors into the PowerPoint presentation.

Parameters

position

Text box position.

Key Type Description
coordinateX int EMUs (English Metric Unit). Automatically calculated from the start and end connections if not set
coordinateY int EMUs (English Metric Unit). Automatically calculated from the start and end connections if not set
sizeX int EMUs (English Metric Unit). Automatically calculated from the start and end connections if not set
sizeY int EMUs (English Metric Unit). Automatically calculated from the start and end connections if not set
name string Internal name. If not set, a random name is generated.
order int Set the display order. Default after existing contents. 0 is the first order position. If the order position doesn't exist add after existing contents.

Coordinate and size values must be set.

connection

Key Type Description
start int or string id or internal name.
end int or string id or internal name.
positionStart string
  • top
  • left
  • right (default)
  • bottom

Only used when $position is calculated automatically. If not set, the position is detected automatically.

positionEnd string
  • top
  • left (default)
  • right
  • bottom

Only used when $position is calculated automatically. If not set, the position is detected automatically.

flipH bool Flipped horizontally. Default as false.
flipV bool Flipped vertically. Default as false.

options

Key Type Description
color string FF0000, 00FFFF...
dash string
  • solid
  • dot
  • dash
  • lgDash
  • dashDot
  • lgDashDot
  • lgDashDotDot
  • sysDash
  • sysDot
  • sysDashDot
  • sysDashDotDot
geom string
  • bentConnector2
  • bentConnector3
  • bentConnector4
  • bentConnector5
  • curvedConnector2
  • curvedConnector3
  • curvedConnector4
  • curvedConnector5
  • straightConnector1 (default)
lineWidth int EMUs (English Metric Unit)
rotation int 60.000ths of a degree.
shapeGuide array
  • 'fmla' (string) shape guide formula
  • 'guide' (string) shape guide name
tailEnd string
  • arrow
  • diamond
  • none
  • oval
  • stealth
  • triangle (default)
Exceptions

Method not available.

Not valid connections.

Position not valid.

Code samples

Example #1

The resulting PPTX looks like:

Release notes
  • phppptx 4.0:
    • new method.