Example #1
0
 /**
  * Create a new ListItem
  *
  * @param string $text
  * @param int $depth
  * @param mixed $styleText
  * @param mixed $styleList
  */
 public function __construct($text, $depth = 0, $styleFont = null, $styleList = null, $styleParagraph = null)
 {
     $this->_style = new PHPWord_Style_ListItem();
     $this->_textObject = new PHPWord_Section_Text($text, $styleFont, $styleParagraph);
     $this->_depth = $depth;
     if (!is_null($styleList) && is_array($styleList)) {
         foreach ($styleList as $key => $value) {
             if (substr($key, 0, 1) != '_') {
                 $key = '_' . $key;
             }
             $this->_style->setStyleValue($key, $value);
         }
     }
 }
Example #2
0
 /**
  * Create a new ListItem
  * 
  * @param string $text
  * @param int $depth
  * @param mixed $styleText
  * @param mixed $styleList
  */
 public function __construct($text, $depth = 0, $styleFont = null, $styleList = null, $styleParagraph = null)
 {
     require_once __DIR__ . '/Text.php';
     require_once __DIR__ . '/../Style/ListItem.php';
     $this->_style = new Document_Word_Writer_Style_ListItem();
     $this->_textObject = new Document_Word_Writer_Section_Text($text, $styleFont, $styleParagraph);
     $this->_depth = $depth;
     if (!is_null($styleList) && is_array($styleList)) {
         foreach ($styleList as $key => $value) {
             if (substr($key, 0, 1) != '_') {
                 $key = '_' . $key;
             }
             $this->_style->setStyleValue($key, $value);
         }
     }
 }