Creates a regular expression to check for the sub-nodes in the outline.
array $nodes: An array of nodes to check in outline.
A regular expression that locates sub-nodes of the outline.
function generateOutlinePattern($nodes) {
$outline = '';
foreach ($nodes as $node) {
$outline .= '(node\\/' . $node->nid . ')(.*?)(' . $node->title . ')(.*?)';
}
return '/<div id="book-navigation-' . $this->book->nid . '"(.*?)<ul(.*?)' . $outline . '<\\/ul>/s';
}