Pressbooks\Modules\Export\Epub\Epub201::createNCX PHP Method

createNCX() protected method

Create NCX file.
protected createNCX ( array $book_contents, array $metadata )
$book_contents array
$metadata array
    protected function createNCX($book_contents, $metadata)
    {
        if (empty($this->manifest)) {
            throw new \Exception('$this->manifest cannot be empty. Did you forget to call $this->createOEPBS() ?');
        }
        $vars = array('author' => @$metadata['pb_author'], 'manifest' => $this->manifest, 'dtd_uid' => !empty($metadata['pb_ebook_isbn']) ? $metadata['pb_ebook_isbn'] : get_bloginfo('url'), 'enable_external_identifier' => true, 'lang' => $this->lang);
        file_put_contents($this->tmpDir . '/toc.ncx', $this->loadTemplate($this->dir . '/templates/epub201/ncx.php', $vars));
    }