|
static | create ($param1, $param2=null) |
|
Definition at line 34 of file Outline.php.
◆ count()
◆ create()
static create |
( |
|
$param1, |
|
|
|
$param2 = null |
|
) |
| |
|
static |
Create new Outline object
It provides two forms of input parameters:
- Zend_Pdf_Outline::create(string $title[, Zend_Pdf_Target $target])
- Zend_Pdf_Outline::create(array $options)
Second form allows to provide outline options as an array. The followed options are supported: 'title' - string, outline title, required 'open' - boolean, true if outline entry is open (default value is false) 'color' - Zend_Pdf_Color_Rgb object, true if outline entry is open (default value is null - black) 'italic' - boolean, true if outline entry is displayed in italic (default value is false) 'bold' - boolean, true if outline entry is displayed in bold (default value is false) 'target' - Zend_Pdf_Target object or string, outline item destination
- Returns
- Zend_Pdf_Outline
- Exceptions
-
Definition at line 230 of file Outline.php.
232 #require_once 'Zend/Pdf/Outline/Created.php'; 233 if (is_string($param1)) {
234 if ($param2 !==
null && !($param2 instanceof
Zend_Pdf_Target || is_string($param2))) {
235 #require_once 'Zend/Pdf/Exception.php'; 236 throw new Zend_Pdf_Exception(
'Outline create method takes $title (string) and $target (Zend_Pdf_Target or string) or an array as an input');
240 'target' => $param2));
242 if (!is_array($param1) || $param2 !==
null) {
243 #require_once 'Zend/Pdf/Exception.php'; 244 throw new Zend_Pdf_Exception(
'Outline create method takes $title (string) and $destination (Zend_Pdf_Destination) or an array as an input');
◆ current()
◆ dumpOutline()
Dump Outline and its child outlines into PDF structures
Returns dictionary indirect object or reference
- Parameters
-
Zend_Pdf_ElementFactory | $factory | object factory for newly created indirect objects |
boolean | $updateNavigation | Update navigation flag |
Zend_Pdf_Element | $parent | Parent outline dictionary reference |
Zend_Pdf_Element | $prev | Previous outline dictionary reference |
SplObjectStorage | $processedOutlines | List of already processed outlines |
- Returns
- Zend_Pdf_Element
◆ getChildren()
Returns the child outline.
- Returns
- Zend_Pdf_Outline|null
Definition at line 344 of file Outline.php.
346 return current($this->childOutlines);
◆ getColor()
◆ getOptions()
Get outline options
- Returns
- array
Definition at line 156 of file Outline.php.
158 return array(
'title' => $this->_title,
159 'open' => $this->_open,
160 'color' => $this->_color,
161 'italic' => $this->_italic,
162 'bold' => $this->_bold,
163 'target' => $this->_target);
◆ getTarget()
◆ getTitle()
Get outline title.
- Returns
- string
◆ hasChildren()
Implements RecursiveIterator interface.
- Returns
- bool whether container has any pages
Definition at line 354 of file Outline.php.
356 return count($this->childOutlines) > 0;
◆ isBold()
Returns true if outline item is displayed in bold
- Returns
- boolean
◆ isItalic()
Returns true if outline item is displayed in italic
- Returns
- boolean
◆ isOpen()
Returns true if outline item is open by default
- Returns
- boolean
Definition at line 71 of file Outline.php.
◆ key()
Returns current iterator key
- Returns
- integer
Definition at line 308 of file Outline.php.
310 return key($this->childOutlines);
◆ next()
Go to next child
Definition at line 316 of file Outline.php.
318 return next($this->childOutlines);
◆ openOutlinesCount()
Returns number of the total number of open items at all levels of the outline.
Definition at line 257 of file Outline.php.
262 foreach ($this->childOutlines as $child) {
263 $count += $child->openOutlinesCount();
◆ rewind()
Rewind children
Definition at line 324 of file Outline.php.
326 return reset($this->childOutlines);
◆ setColor()
Set outline text color. (null means default color which is black)
- Parameters
-
- Returns
- Zend_Pdf_Outline
◆ setIsBold()
◆ setIsItalic()
◆ setIsOpen()
◆ setOptions()
setOptions |
( |
array |
$options | ) |
|
Set outline options
- Parameters
-
- Returns
- Zend_Pdf_Action
- Exceptions
-
Definition at line 173 of file Outline.php.
201 #require_once 'Zend/Pdf/Exception.php';
setColor(Zend_Pdf_Color_Rgb $color)
◆ setTarget()
setTarget |
( |
|
$target = null | ) |
|
|
abstract |
◆ setTitle()
◆ valid()
Check if current position is valid
- Returns
- boolean
Definition at line 334 of file Outline.php.
336 return current($this->childOutlines) !==
false;
◆ $_open
◆ $childOutlines
The documentation for this class was generated from the following file:
- vendor/magento/zendframework1/library/Zend/Pdf/Outline.php