Adds collection API #3

Merged
chris merged 5 commits from collection-api into develop 2021-11-10 14:04:18 +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.'
]
]);
}
}