/** * @copydoc SetupListbuilderHandler::initialize() */ function initialize($request) { parent::initialize($request); AppLocale::requireComponents(LOCALE_COMPONENT_PKP_MANAGER); $footerCategoryId = (int) $request->getUserVar('footerCategoryId'); $context = $request->getContext(); $footerCategoryDao = DAORegistry::getDAO('FooterCategoryDAO'); $footerCategory = $footerCategoryDao->getById($footerCategoryId, $context->getId()); if ($footerCategoryId && !isset($footerCategory)) { fatalError('Footer Category does not exist within this context.'); } else { $this->_footerCategoryId = $footerCategoryId; } // Basic configuration $this->setTitle('grid.content.navigation.footer.FooterLink'); $this->setSourceType(LISTBUILDER_SOURCE_TYPE_TEXT); $this->setSaveType(LISTBUILDER_SAVE_TYPE_EXTERNAL); $this->setSaveFieldName('footerLinks'); import('lib.pkp.controllers.listbuilder.content.navigation.FooterLinkListbuilderGridCellProvider'); // Title column $titleColumn = new MultilingualListbuilderGridColumn($this, 'title', 'common.title', null, null, null, null, array('tabIndex' => 1)); $titleColumn->setCellProvider(new FooterLinkListbuilderGridCellProvider()); $this->addColumn($titleColumn); // Url column $urlColumn = new MultilingualListbuilderGridColumn($this, 'url', 'common.url', null, null, null, null, array('tabIndex' => 2)); $urlColumn->setCellProvider(new FooterLinkListbuilderGridCellProvider()); $this->addColumn($urlColumn); }
/** * @copydoc ListbuilderHandler::initialize() */ function initialize($request) { parent::initialize($request); AppLocale::requireComponents(LOCALE_COMPONENT_APP_ADMIN); // Basic configuration $this->setTitle('admin.categories'); $this->setSaveType(LISTBUILDER_SAVE_TYPE_EXTERNAL); $this->setSaveFieldName('categories'); $this->setSourceType(LISTBUILDER_SOURCE_TYPE_TEXT); // Title column $titleColumn = new MultilingualListbuilderGridColumn($this, 'name', 'common.name', null, null, null, null, array('tabIndex' => 1)); import('controllers.listbuilder.admin.categories.CategoryListbuilderGridCellProvider'); $titleColumn->setCellProvider(new CategoryListbuilderGridCellProvider()); $this->addColumn($titleColumn); }
/** * @copydoc SetupListbuilderHandler::initialize() */ function initialize($request) { parent::initialize($request); AppLocale::requireComponents(LOCALE_COMPONENT_PKP_MANAGER); $this->_reviewFormElementId = (int) $request->getUserVar('reviewFormElementId'); // Basic configuration $this->setTitle('grid.reviewFormElement.responseItems'); $this->setSourceType(LISTBUILDER_SOURCE_TYPE_TEXT); $this->setSaveType(LISTBUILDER_SAVE_TYPE_EXTERNAL); $this->setSaveFieldName('possibleResponses'); // Possible response column $responseColumn = new MultilingualListbuilderGridColumn($this, 'possibleResponse', 'manager.reviewFormElements.possibleResponse', null, null, null, null, array('tabIndex' => 1)); import('lib.pkp.controllers.listbuilder.settings.reviewForms.ReviewFormElementResponseItemListbuilderGridCellProvider'); $responseColumn->setCellProvider(new ReviewFormElementResponseItemListbuilderGridCellProvider()); $this->addColumn($responseColumn); }