Overview

Namespaces

  • None
  • PHP
  • WkHtmlToPdf
    • Options

Classes

  • WkHtmlToPdf\WkHtmlToPdf

Interfaces

  • Throwable

Traits

  • WkHtmlToPdf\Options\GlobalOptionsTrait
  • WkHtmlToPdf\Options\HeaderFooterOptionsTrait
  • WkHtmlToPdf\Options\OutlineOptionsTrait
  • WkHtmlToPdf\Options\PageOptionsTrait
  • WkHtmlToPdf\Options\TocOptionsTrait

Exceptions

  • Exception

Functions

  • join_path
  • Overview
  • Namespace
  • Class
  • Tree
 1: <?php
 2: 
 3: namespace WkHtmlToPdf\Options;
 4: 
 5: use WkHtmlToPdf\WkHtmlToPdf;
 6: 
 7: /**
 8:  * Outline options trait.
 9:  *
10:  * @author ivanpepelko
11:  */
12: trait OutlineOptionsTrait
13: {
14:     /**
15:      * Dump the outline to a file.
16:      *
17:      * @param string $file
18:      *
19:      * @return WkHtmlToPdf
20:      */
21:     public function setDumpOutline($file)
22:     {
23:         $this->arguments['dump-outline'] = $file;
24: 
25:         return $this;
26:     }
27: 
28:     /**
29:      * Put an outline into the pdf (default).
30:      *
31:      * @return WkHtmlToPdf
32:      */
33:     public function enableOutline()
34:     {
35:         if (array_key_exists('no-outline', $this->arguments)) {
36:             unset($this->arguments['no-outline']);
37:         }
38:         $this->arguments['outline'] = null;
39: 
40:         return $this;
41:     }
42: 
43:     /**
44:      * Do not put an outline into the pdf.
45:      *
46:      * @return WkHtmlToPdf
47:      */
48:     public function disableOutline()
49:     {
50:         if (array_key_exists('outline', $this->arguments)) {
51:             unset($this->arguments['outline']);
52:         }
53:         $this->arguments['no-outline'] = null;
54: 
55:         return $this;
56:     }
57: 
58:     /**
59:      * Set the depth of the outline (default 4).
60:      *
61:      * @param int $level
62:      *
63:      * @return WkHtmlToPdf
64:      */
65:     public function setOutline($level = 4)
66:     {
67:         $this->arguments['outline-depth'] = $level;
68: 
69:         return $this;
70:     }
71: }
72: 
wkp2p API documentation generated by ApiGen