public function getChildParts(PartFilter $filter = null)
    {
        if ($filter !== null) {
            return array_values(array_filter($this->children, [ $filter, 'filter' ]));
        }
        return $this->children;
    }
public function getChildParts(PartFilter $filter = null)
    {
        if ($filter !== null) {
            return array_values(array_filter($this->children, [ $filter, 'filter' ]));
        }
        return $this->children;
    }
public function getChildParts ( PartFilter $ filter = null ) { if ( $ filter !== null ) { return array_values ( array_filter ( $ this -> children , [ $ filter , 'filter' ] ) ) ; } return $ this -> children ; }
Returns all direct child parts.

If a PartFilter is provided, the PartFilter is applied before returning.

@param PartFilter $filter
@return MessagePart[]
Returns all direct child parts .