Esempio n. 1
0
 public function format(Node $node, Document $document)
 {
     $position = $node->getAttribute('list-position');
     $node->assignEnumerationStrategyFromFactory();
     if ($position === BasicList::LIST_POSITION_INSIDE) {
         $widthOfEnumerationChar = $node->getEnumerationStrategy()->getWidthOfTheBiggestPosibleEnumerationElement($document, $node);
         foreach ($node->getChildren() as $child) {
             $marginLeft = $widthOfEnumerationChar + $child->getMarginLeft();
             $child->setAttribute('margin-left', $marginLeft);
         }
     }
 }