Adds cross site api #4
|
@ -10,9 +10,7 @@ return [
|
||||||
//'type' => \Laminas\Router\Http\Segment::class,
|
//'type' => \Laminas\Router\Http\Segment::class,
|
||||||
'type' => \Laminas\Router\Http\Literal::class,
|
'type' => \Laminas\Router\Http\Literal::class,
|
||||||
'options' => [
|
'options' => [
|
||||||
//'route' => '/collections[/:action]',
|
'route' => '/api/collections/search',
|
||||||
//'route' => '/collections',
|
|
||||||
'route' => '/collections/search',
|
|
||||||
'defaults' => [
|
'defaults' => [
|
||||||
'__NAMESPACE__' => 'ArchiveSiteMeta\Controller',
|
'__NAMESPACE__' => 'ArchiveSiteMeta\Controller',
|
||||||
'controller' => Controller\ArchiveSiteMetaController::class,
|
'controller' => Controller\ArchiveSiteMetaController::class,
|
||||||
|
|
|
@ -52,7 +52,9 @@ class ArchiveSiteMetaController extends AbstractActionController
|
||||||
array_push($query_results, $site->id());
|
array_push($query_results, $site->id());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$pages = $this->api()->search('site_pages', $resources['site_pages']['query'], ['returnScalar' => 'site'])->getContent();
|
$pages = $this->api()->search('site_pages',
|
||||||
|
$resources['site_pages']['query'],
|
||||||
|
['returnScalar' => 'site'])->getContent();
|
||||||
foreach($pages as $page) {
|
foreach($pages as $page) {
|
||||||
array_push($query_results, (int)$page);
|
array_push($query_results, (int)$page);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue