/** * Create Query Response instance * * @param mixed $rawResponse * @return \Magento\Framework\Search\Response\QueryResponse */ public function create($rawResponse) { $documents = []; foreach ($rawResponse['documents'] as $rawDocument) { /** @var \Magento\Framework\Api\Search\Document[] $documents */ $documents[] = $this->documentFactory->create($rawDocument); } /** @var \Magento\Framework\Search\Response\Aggregation $aggregations */ $aggregations = $this->aggregationFactory->create($rawResponse['aggregations']); return $this->objectManager->create('Magento\\Framework\\Search\\Response\\QueryResponse', ['documents' => $documents, 'aggregations' => $aggregations]); }
<br /> <p> <input type="submit" name="post_changes" value="<?php echo _('Delete'); ?> " /></p> </form></p> <?php docman_footer(array()); // // // Display the main admin page // // } else { $df = new DocumentFactory($g); if ($df->isError()) { exit_error(_('Error'), $df->getErrorMessage()); } $dgf = new DocumentGroupFactory($g); if ($dgf->isError()) { exit_error(_('Error'), $dgf->getErrorMessage()); } $df->setStateID('ALL'); // $df->setSort('stateid'); $d_arr =& $df->getDocuments(); docman_header(sprintf(_('Project %s'), $g->getPublicName()), _('Document Manager: Administration'), 'admin'); ?> <h3><?php echo _('Document Manager: Administration');
require_once '../env.inc.php'; require_once $gfwww . 'include/pre.php'; require_once $gfwww . 'docman/include/vtemplate.class.php'; require_once $gfwww . 'docman/include/doc_utils.php'; require_once $gfcommon . 'docman/DocumentFactory.class.php'; require_once $gfcommon . 'docman/DocumentGroupFactory.class.php'; $group_id = getIntFromRequest('group_id'); $language_id = getIntFromRequest('language_id'); if (!$group_id) { exit_no_group(); } $g =& group_get_object($group_id); if (!$g || !is_object($g) || $g->isError()) { exit_no_group(); } $df = new DocumentFactory($g); if ($df->isError()) { exit_error(_('Error'), $df->getErrorMessage()); } $dgf = new DocumentGroupFactory($g); if ($dgf->isError()) { exit_error(_('Error'), $dgf->getErrorMessage()); } // the "selected language" variable will be used in the links to navigate the // document groups tree if (!$language_id) { if (session_loggedin()) { $language_id = $LUSER->getLanguage(); } else { $language_id = 1; }
} } echo ",\n\t\t],"; } } } $group_id = getIntFromRequest('group_id'); $language_id = getStringFromRequest('language_id'); if (!$group_id) { exit_no_group(); } $g =& group_get_object($group_id); if (!$g || !is_object($g) || $g->isError()) { exit_no_group(); } $df = new DocumentFactory($g); if ($df->isError()) { exit_error(_('Error'), $df->getErrorMessage()); } $dgf = new DocumentGroupFactory($g); if ($dgf->isError()) { exit_error(_('Error'), $dgf->getErrorMessage()); } // Save chosen language in docman and print document details in documents list if ($language_id) { setcookie("my_language_id", "{$language_id}", time() + 3600 * 24 * 999); } if (!$language_id && isset($_COOKIE["my_language_id"])) { $language_id = $_COOKIE["my_language_id"]; } // the "selected language" variable will be used in the links to navigate the