Свойство | Type | Description | |
---|---|---|---|
$bookMeta | array | Book Metadata | |
$bookTitle | string | Holds the title of the book being published | |
$exportStylePath | string | Fullpath to book CSS file. | |
$globalOptions | array | Global theme options, set by the user | |
$memoryNeeded | integer | mPDF uses a lot of memory, this the recommended minimum | |
$mpdf | object | MPDF Class | |
$numbered | boolean | Number the chapters | |
$options | array | mPDF theme options, set by the user |
Méthode | Description | |
---|---|---|
__construct ( ) | ||
addBookInfo ( ) | Add book information page, otherwise known as title page | |
addCopyright ( ) | Copyright information on a separate page | |
addCover ( ) | Add the cover for the book. | |
addFrontMatter ( array $contents ) | Adds front matter, resets the page numbering on the first loop, romanizes the numeric style | |
addFrontMatterByType ( string $type, array $contents ) | Add front matter of a specific/special type | |
addPage ( array $page, array $page_options = [], boolean $display_footer = true, boolean $display_header = true ) : boolean | Add a page to the pdf | |
addPartsAndChapters ( $contents ) | ||
addPreContent ( array $contents ) | Add all specially handled content. | |
addToc ( ) | Add the mpdf Table of Contents. | |
convert ( ) : boolean | Book Assembly. Create $this->outputPath | |
fixAnnoyingCharacters ( string $html ) : string | This function prevents mPDF from completely aborting the export routine, or replacing each non-breaking space with a '?' if ignore_invalid_utf8 is true. Important to leave this in. | |
getBookmarkEntry ( array $page ) : string | Return the PDF bookmark entry for this page should be unique, using static variable for cheap cache | |
getFilteredContent ( string $content ) : string | Cleans up html | |
getFooter ( boolean $display = true, string $content = '' ) : string | Return formatted footers. | |
getHeader ( boolean $display = true, string $content = '' ) : string | Return formatted headers. | |
getOrderedBookContents ( ) : array | Restructures \Pressbooks\Book::getBookContents() into a format more useful for direct iteration, and tracks a nesting level for Bookmark and ToC entries. | |
getThemeCss ( object $theme ) : string | Get current child and parent theme css files. Child themes only have one parent theme, and 99% of the time this is 'Luther' or /pressbooks-book/ whose stylesheet is named 'style.css' | |
getTocEntry ( string $page ) : string | Return the Table of Contents entry for this page. | |
hasDependencies ( ) : boolean | Dependency check. | |
setCss ( ) | Add all css files | |
validate ( ) : boolean | Check the sanity of $this->outputPath |
Méthode | Description | |
---|---|---|
atLeastOneExport ( array $chapters ) : boolean | Does array of chapters have at least one export? Recursive. | |
isPdf ( string $file ) : boolean | Verify if file has 'application/pdf' mimeType. |
Méthode | Description | |
---|---|---|
stripUnwantedStyles ( array $styles ) : array | Helper function to omit unwanted stylesheets in the output |
public addBookInfo ( ) |
public addFrontMatter ( array $contents ) | ||
$contents | array |
public addFrontMatterByType ( string $type, array $contents ) | ||
$type | string | - special content placed ahead of everything else |
$contents | array | - book contents |
public addPage ( array $page, array $page_options = [], boolean $display_footer = true, boolean $display_header = true ) : boolean | ||
$page | array | - the content |
$page_options | array | - numbering reset, style, suppress adding to TOC |
$display_footer | boolean | turn on/off footer display |
$display_header | boolean | turn on/off header display |
Résultat | boolean |
public addPreContent ( array $contents ) | ||
$contents | array | - the book |
public addToc ( ) |
protected atLeastOneExport ( array $chapters ) : boolean | ||
$chapters | array | |
Résultat | boolean |
public fixAnnoyingCharacters ( string $html ) : string | ||
$html | string | |
Résultat | string |
public getBookmarkEntry ( array $page ) : string | ||
$page | array | |
Résultat | string |
public getFilteredContent ( string $content ) : string | ||
$content | string | |
Résultat | string |
public getOrderedBookContents ( ) : array | ||
Résultat | array |
public getThemeCss ( object $theme ) : string | ||
$theme | object | |
Résultat | string | $css |
public getTocEntry ( string $page ) : string | ||
$page | string | |
Résultat | string |
static public hasDependencies ( ) : boolean | ||
Résultat | boolean |
protected string $bookTitle | ||
Résultat | string |
protected string $exportStylePath | ||
Résultat | string |
protected array $globalOptions | ||
Résultat | array |
protected int $memoryNeeded | ||
Résultat | integer |
protected array $options | ||
Résultat | array |