Adds cross site api #4

Merged
chris merged 10 commits from develop into main 2021-12-15 10:51:55 +01:00
2 changed files with 14 additions and 4 deletions
Showing only changes of commit dffeb3ff33 - Show all commits

View File

@ -28,10 +28,13 @@ return [
'template_path_stack' => [
dirname(__DIR__) . '/view',
],
'strategies' => [
'ViewJsonStrategy',
],
'template_map' => [
// used to remove available blocks when editing a page
'omeka/site-admin/page/edit' => __DIR__ . '/../../../themes/archive/view/omeka/site-admin/page/edit.phtml',
'archive-site-meta/archive-site-meta/index' => __DIR__ . '/../view/collections/index.phtml',
//'archive-site-meta/archive-site-meta/index' => __DIR__ . '/../view/collections/index.phtml',
//'layout/layout' => __DIR__ . '/../../../themes/archive/view/layout/layout.phtml',
//'omeka/index/index' => __DIR__ . '/../../../themes/archive/view/omeka/site/index/index.phtml',
//'omeka/search/results' => __DIR__ . '/../../../themes/archive/view/omeka/search/results.phtml',

View File

@ -2,7 +2,8 @@
namespace ArchiveSiteMeta\Controller;
use Laminas\Mvc\Controller\AbstractActionController;
use Laminas\View\Model\ViewModel;
#use Laminas\View\Model\ViewModel;
use Laminas\View\Model\JsonModel;
class ArchiveSiteMetaController extends AbstractActionController
{
@ -14,8 +15,14 @@ class ArchiveSiteMetaController extends AbstractActionController
public function indexAction()
{
$view = new ViewModel;
return $view;
return new JsonModel([
'status' => 'SUCCESS',
'message'=>'Here is your data',
'data' => [
'full_name' => 'John Doe',
'address' => '51 Middle st.'
]
]);
}
}