Adds cross site api #4
|
@ -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',
|
||||
|
|
|
@ -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.'
|
||||
]
|
||||
]);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue