def _init_theme_plugin(self): if 'theme' in self.config: self.theme_name = self.config['theme'].get('id', '') tp = plugin.load_theme_plugin(self.name, self.theme_name) if tp: self.theme_plugin = tp(self) else: self.theme_name = None
def _init_theme_plugin(self): """ Checks for custom theme's plugin. If no custom plugin if found, it will load the mpdf default one """ default_theme_plugin = plugin.MPDFPlugin if 'theme' in self.config: self.theme_name = self.config['theme'].get('id', '') tp = plugin.load_theme_plugin(self.name, self.theme_name) self.theme_plugin = tp(self) if tp else default_theme_plugin(self)
def _get_theme_plugin(self): return plugin.load_theme_plugin(self._theme_suffix, self.theme_name)
def _get_theme_plugin(self): return plugin.load_theme_plugin(self.name, self.theme_name)
def _get_theme_plugin(self): """Return theme plugin Theme plugin loads using "epub" key, because we repeat epub convertion. """ return plugin.load_theme_plugin('epub', self.theme_name)