. */ use Zend_Session; /** * 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(); Zend_Session::writeClose(); header('Content-Type: text/html; charset=UTF-8'); echo $html; break; case 'index': global $controller, $WT_SESSION, $WT_TREE; $MAX_PEDIGREE_GENERATIONS = $WT_TREE->getPreference('MAX_PEDIGREE_GENERATIONS'); $clip_ctrl = new ClippingsCart; $controller = new PageController; $controller ->setPageTitle($this->getTitle()) ->PageHeader() ->addExternalJavascript(WT_AUTOCOMPLETE_JS_URL) ->addInlineJavascript('autocomplete();'); echo ''; if (!$WT_SESSION->cart[$WT_TREE->getTreeId()]) { echo '