src/Invoice/FlattenerInvoiceLines.php
protected function collectInfoFromChildren(array $parent, array $children)
    {
        $invoiceSettings = $this->config->getInvoiceSettings();
        if (!$invoiceSettings['optionsShow']) {
            $parent[Meta::ChildrenNotShown] = count($children);
        } else {
            $parent[Tag::Product] = $this->getMergedLinesText($parent, $children);
            $parent[Meta::ChildrenMerged] = count($children);
        }
        return $parent;
    }
protected function collectInfoFromChildren(array $parent, array $children)
    {
        $invoiceSettings = $this->config->getInvoiceSettings();
        if (!$invoiceSettings['optionsShow']) {
            $parent[Meta::ChildrenNotShown] = count($children);
        } else {
            $parent[Tag::Product] = $this->getMergedLinesText($parent, $children);
            $parent[Meta::ChildrenMerged] = count($children);
        }
        return $parent;
    }
protected function collectInfoFromChildren ( array $ parent , array $ children ) { $ invoiceSettings = $ this -> config -> getInvoiceSettings ( ) ; if ( ! $ invoiceSettings [ 'optionsShow' ] ) { $ parent [ Meta :: ChildrenNotShown ] = count ( $ children ) ; } else { $ parent [ Tag :: Product ] = $ this -> getMergedLinesText ( $ parent , $ children ) ; $ parent [ Meta :: ChildrenMerged ] = count ( $ children ) ; } return $ parent ; }
Allows to collect info from the child lines and add it to the parent.

This method is called before the child lines are merged into the parent
invoice line.

This base implementation merges the product descriptions from the child
lines into the parent product description.

Situations that may have to be covered by web shop specific overrides:
- Price info only on parent.
- Price info only on children.
- Price info both on parent and children and the amounts appear twice
(price on parent is the sum of the prices of the children).
- Price info both on parent and children but the amounts are not doubled
(base price on parent plus extra charges for options on children).

Examples;
- There are amounts on the children but as they are going to be merged
into the parent they would get lost.

@param array $parent
The parent invoice line.
@param array[] $children
The child invoice lines.

@return array
The parent line extended with the collected info.
Allows to collect info from the child lines and add it to the parent .