public function getMyToc()
    {
        $parent = $this->getParent();

        if ($parent) {
            foreach ($parent['tocs'] as $toc) {
                if (in_array($this->currentFileName, $toc)) {
                    $before = array();
                    $after = $toc;

                    while ($after) {
                        $file = array_shift($after);
                        if ($file == $this->currentFileName) {
                            return array($before, $after);
                        }
                        $before[] = $file;
                    }
                }
            }
        }

        return null;
    }
public function getMyToc()
    {
        $parent = $this->getParent();

        if ($parent) {
            foreach ($parent['tocs'] as $toc) {
                if (in_array($this->currentFileName, $toc)) {
                    $before = array();
                    $after = $toc;

                    while ($after) {
                        $file = array_shift($after);
                        if ($file == $this->currentFileName) {
                            return array($before, $after);
                        }
                        $before[] = $file;
                    }
                }
            }
        }

        return null;
    }
public function getMyToc ( ) { $ parent = $ this -> getParent ( ) ; if ( $ parent ) { foreach ( $ parent [ 'tocs' ] as $ toc ) { if ( in_array ( $ this -> currentFileName , $ toc ) ) { $ before = array ( ) ; $ after = $ toc ; while ( $ after ) { $ file = array_shift ( $ after ) ; if ( $ file == $ this -> currentFileName ) { return array ( $ before , $ after ) ; } $ before [ ] = $ file ; } } } } return null ; }
Get the docs involving this document
Get the docs involving this document