. */ /** * Class ClippingsCartModule */ class ClippingsCartModule extends AbstractModule implements ModuleMenuInterface, ModuleSidebarInterface { /** {@inheritdoc} */ public function getTitle() { return /* I18N: Name of a module */ I18N::translate('Clippings cart'); } /** {@inheritdoc} */ public function getDescription() { return /* I18N: Description of the “Clippings cart” module */ I18N::translate('Select records from your family tree and save them as a GEDCOM file.'); } /** {@inheritdoc} */ public function defaultAccessLevel() { return Auth::PRIV_USER; } /** {@inheritdoc} */ public function modAction($mod_action) { switch ($mod_action) { case 'ajax': $html = $this->getSidebarAjaxContent(); header('Content-Type: text/html; charset=UTF-8'); echo $html; break; case 'index': global $controller, $WT_TREE; $MAX_PEDIGREE_GENERATIONS = $WT_TREE->getPreference('MAX_PEDIGREE_GENERATIONS'); $cart = Session::get('cart'); $clip_ctrl = new ClippingsCart; $controller = new PageController; $controller ->setPageTitle($this->getTitle()) ->PageHeader() ->addExternalJavascript(WT_AUTOCOMPLETE_JS_URL) ->addInlineJavascript('autocomplete();'); echo ''; if (!$cart[$WT_TREE->getTreeId()]) { echo '