PublicationEntryHandler::fetch PHP Method

fetch() public method

Display the tabs index page.
public fetch ( $args, $request )
$args array
$request PKPRequest
    function fetch($args, $request)
    {
        $templateMgr = TemplateManager::getManager($request);
        $templateMgr->assign(array('submissionId' => $this->getSubmission()->getId(), 'stageId' => $this->getStageId(), 'selectedTab' => (int) $this->getTabPosition(), 'hideHelp' => (bool) $request->getUserVar('hideHelp')));
        $this->setupTemplate($request);
    }

Usage Example

Exemplo n.º 1
0
 /**
  * Display the tabs index page.
  * @param $args array
  * @param $request PKPRequest
  * @return JSONMessage JSON object
  */
 function fetch($args, $request)
 {
     parent::fetch($args, $request);
     $templateMgr = TemplateManager::getManager($request);
     $templateMgr->assign('selectedFormatId', $this->getSelectedFormatId());
     $submission = $this->getSubmission();
     // load in any publication formats assigned to this published monograph
     $publicationFormatDao = DAORegistry::getDAO('PublicationFormatDAO');
     $formats = $publicationFormatDao->getBySubmissionId($submission->getId());
     $publicationFormats = array();
     while ($publicationFormat = $formats->next()) {
         $publicationFormats[] = $publicationFormat;
     }
     $templateMgr->assign_by_ref('publicationFormats', $publicationFormats);
     $application = Application::getApplication();
     $request = $application->getRequest();
     $router = $request->getRouter();
     $dispatcher = $router->getDispatcher();
     // These two URLs are catalog/monograph specific.
     $tabsUrl = $dispatcher->url($request, ROUTE_COMPONENT, null, 'modals.submissionMetadata.CatalogEntryHandler', 'fetchFormatInfo', null, array('submissionId' => $submission->getId(), 'stageId' => $this->getStageId()));
     $templateMgr->assign('tabsUrl', $tabsUrl);
     $tabContentUrl = $dispatcher->url($request, ROUTE_COMPONENT, null, 'tab.catalogEntry.CatalogEntryTabHandler', 'publicationMetadata', null, array('submissionId' => $submission->getId(), 'stageId' => $this->getStageId()));
     $templateMgr->assign('tabContentUrl', $tabContentUrl);
     return $templateMgr->fetchJson('controllers/modals/submissionMetadata/catalogEntryTabs.tpl');
 }
All Usage Examples Of PublicationEntryHandler::fetch