Merge pull request #1329 from eweso/patch-1
Adding setNumId method for ListItem style
This commit is contained in:
commit
85e9144822
|
|
@ -139,6 +139,16 @@ class ListItem extends AbstractStyle
|
||||||
return $this->numId;
|
return $this->numId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set numbering Id. Same numId means same list
|
||||||
|
* @param mixed $numInt
|
||||||
|
*/
|
||||||
|
public function setNumId($numInt)
|
||||||
|
{
|
||||||
|
$this->numId = $numInt;
|
||||||
|
$this->getListTypeStyle();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get legacy numbering definition
|
* Get legacy numbering definition
|
||||||
*
|
*
|
||||||
|
|
@ -148,7 +158,12 @@ class ListItem extends AbstractStyle
|
||||||
private function getListTypeStyle()
|
private function getListTypeStyle()
|
||||||
{
|
{
|
||||||
// Check if legacy style already registered in global Style collection
|
// Check if legacy style already registered in global Style collection
|
||||||
$numStyle = "PHPWordList{$this->listType}";
|
$numStyle = 'PHPWordListType' . $this->listType;
|
||||||
|
|
||||||
|
if ($this->numId) {
|
||||||
|
$numStyle .= 'NumId' . $this->numId;
|
||||||
|
}
|
||||||
|
|
||||||
if (Style::getStyle($numStyle) !== null) {
|
if (Style::getStyle($numStyle) !== null) {
|
||||||
$this->setNumStyle($numStyle);
|
$this->setNumStyle($numStyle);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue