ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
PHPExcel_Chart_Legend Class Reference
+ Collaboration diagram for PHPExcel_Chart_Legend:

Public Member Functions

 __construct ($position=self::POSITION_RIGHT, PHPExcel_Chart_Layout $layout=NULL, $overlay=FALSE)
 Create a new PHPExcel_Chart_Legend. More...
 
 getPosition ()
 Get legend position as an excel string value. More...
 
 setPosition ($position=self::POSITION_RIGHT)
 Get legend position using an excel string value. More...
 
 getPositionXL ()
 Get legend position as an Excel internal numeric value. More...
 
 setPositionXL ($positionXL=self::xlLegendPositionRight)
 Set legend position using an Excel internal numeric value. More...
 
 getOverlay ()
 Get allow overlay of other elements? More...
 
 setOverlay ($overlay=FALSE)
 Set allow overlay of other elements? More...
 
 getLayout ()
 Get Layout. More...
 

Data Fields

const xlLegendPositionBottom = -4107
 Legend positions. More...
 
const xlLegendPositionCorner = 2
 
const xlLegendPositionCustom = -4161
 
const xlLegendPositionLeft = -4131
 
const xlLegendPositionRight = -4152
 
const xlLegendPositionTop = -4160
 
const POSITION_RIGHT = 'r'
 
const POSITION_LEFT = 'l'
 
const POSITION_BOTTOM = 'b'
 
const POSITION_TOP = 't'
 
const POSITION_TOPRIGHT = 'tr'
 

Private Attributes

 $_position = self::POSITION_RIGHT
 
 $_overlay = TRUE
 
 $_layout = NULL
 

Static Private Attributes

static $_positionXLref
 

Detailed Description

Definition at line 36 of file Legend.php.

Constructor & Destructor Documentation

◆ __construct()

PHPExcel_Chart_Legend::__construct (   $position = self::POSITION_RIGHT,
PHPExcel_Chart_Layout  $layout = NULL,
  $overlay = FALSE 
)

Create a new PHPExcel_Chart_Legend.

Definition at line 85 of file Legend.php.

References $layout, setOverlay(), and setPosition().

86  {
87  $this->setPosition($position);
88  $this->_layout = $layout;
89  $this->setOverlay($overlay);
90  }
setPosition($position=self::POSITION_RIGHT)
Get legend position using an excel string value.
Definition: Legend.php:106
setOverlay($overlay=FALSE)
Set allow overlay of other elements?
Definition: Legend.php:153
+ Here is the call graph for this function:

Member Function Documentation

◆ getLayout()

PHPExcel_Chart_Legend::getLayout ( )

Get Layout.

Returns
PHPExcel_Chart_Layout

Definition at line 167 of file Legend.php.

References $_layout.

167  {
168  return $this->_layout;
169  }

◆ getOverlay()

PHPExcel_Chart_Legend::getOverlay ( )

Get allow overlay of other elements?

Returns
boolean

Definition at line 143 of file Legend.php.

References $_overlay.

143  {
144  return $this->_overlay;
145  }

◆ getPosition()

PHPExcel_Chart_Legend::getPosition ( )

Get legend position as an excel string value.

Returns
string

Definition at line 97 of file Legend.php.

References $_position.

97  {
98  return $this->_position;
99  }

◆ getPositionXL()

PHPExcel_Chart_Legend::getPositionXL ( )

Get legend position as an Excel internal numeric value.

Returns
number

Definition at line 120 of file Legend.php.

120  {
121  return array_search($this->_position,self::$_positionXLref);
122  }

◆ setOverlay()

PHPExcel_Chart_Legend::setOverlay (   $overlay = FALSE)

Set allow overlay of other elements?

Parameters
boolean$overlay
Returns
boolean

Definition at line 153 of file Legend.php.

Referenced by __construct(), and LegendTest\testGetOverlay().

153  {
154  if (!is_bool($overlay)) {
155  return false;
156  }
157 
158  $this->_overlay = $overlay;
159  return true;
160  }
+ Here is the caller graph for this function:

◆ setPosition()

PHPExcel_Chart_Legend::setPosition (   $position = self::POSITION_RIGHT)

Get legend position using an excel string value.

Parameters
string$position

Definition at line 106 of file Legend.php.

Referenced by __construct(), and LegendTest\testGetPosition().

106  {
107  if (!in_array($position,self::$_positionXLref)) {
108  return false;
109  }
110 
111  $this->_position = $position;
112  return true;
113  }
+ Here is the caller graph for this function:

◆ setPositionXL()

PHPExcel_Chart_Legend::setPositionXL (   $positionXL = self::xlLegendPositionRight)

Set legend position using an Excel internal numeric value.

Parameters
number$positionXL

Definition at line 129 of file Legend.php.

Referenced by LegendTest\testGetPositionXL().

129  {
130  if (!array_key_exists($positionXL,self::$_positionXLref)) {
131  return false;
132  }
133 
134  $this->_position = self::$_positionXLref[$positionXL];
135  return true;
136  }
+ Here is the caller graph for this function:

Field Documentation

◆ $_layout

PHPExcel_Chart_Legend::$_layout = NULL
private

Definition at line 79 of file Legend.php.

Referenced by getLayout().

◆ $_overlay

PHPExcel_Chart_Legend::$_overlay = TRUE
private

Definition at line 72 of file Legend.php.

Referenced by getOverlay().

◆ $_position

PHPExcel_Chart_Legend::$_position = self::POSITION_RIGHT
private

Definition at line 65 of file Legend.php.

Referenced by getPosition().

◆ $_positionXLref

PHPExcel_Chart_Legend::$_positionXLref
staticprivate
Initial value:
= array( self::xlLegendPositionBottom => self::POSITION_BOTTOM,
self::xlLegendPositionCorner => self::POSITION_TOPRIGHT,
self::xlLegendPositionCustom => '??',
self::xlLegendPositionLeft => self::POSITION_LEFT,
self::xlLegendPositionRight => self::POSITION_RIGHT,
self::xlLegendPositionTop => self::POSITION_TOP
)

Definition at line 52 of file Legend.php.

◆ POSITION_BOTTOM

const PHPExcel_Chart_Legend::POSITION_BOTTOM = 'b'

Definition at line 48 of file Legend.php.

Referenced by LegendTest\testGetPosition(), and LegendTest\testSetPosition().

◆ POSITION_LEFT

const PHPExcel_Chart_Legend::POSITION_LEFT = 'l'

Definition at line 47 of file Legend.php.

Referenced by LegendTest\testSetPosition().

◆ POSITION_RIGHT

const PHPExcel_Chart_Legend::POSITION_RIGHT = 'r'

◆ POSITION_TOP

const PHPExcel_Chart_Legend::POSITION_TOP = 't'

Definition at line 49 of file Legend.php.

Referenced by LegendTest\testSetPosition().

◆ POSITION_TOPRIGHT

const PHPExcel_Chart_Legend::POSITION_TOPRIGHT = 'tr'

Definition at line 50 of file Legend.php.

Referenced by LegendTest\testSetPosition().

◆ xlLegendPositionBottom

const PHPExcel_Chart_Legend::xlLegendPositionBottom = -4107

Legend positions.

Definition at line 39 of file Legend.php.

Referenced by LegendTest\testSetPositionXL().

◆ xlLegendPositionCorner

const PHPExcel_Chart_Legend::xlLegendPositionCorner = 2

Definition at line 40 of file Legend.php.

Referenced by LegendTest\testGetPositionXL(), and LegendTest\testSetPositionXL().

◆ xlLegendPositionCustom

const PHPExcel_Chart_Legend::xlLegendPositionCustom = -4161

Definition at line 41 of file Legend.php.

Referenced by LegendTest\testSetPositionXL().

◆ xlLegendPositionLeft

const PHPExcel_Chart_Legend::xlLegendPositionLeft = -4131

Definition at line 42 of file Legend.php.

Referenced by LegendTest\testSetPositionXL().

◆ xlLegendPositionRight

const PHPExcel_Chart_Legend::xlLegendPositionRight = -4152

◆ xlLegendPositionTop

const PHPExcel_Chart_Legend::xlLegendPositionTop = -4160

Definition at line 44 of file Legend.php.

Referenced by LegendTest\testSetPositionXL().


The documentation for this class was generated from the following file: