get('/checkmulti/', function() use ($app, $appbox) { $request = $app['request']; $multi = ($request->get('multi') === 'true'); $tag = \databox_field::loadClassFromTagName($request->get('source')); $datas = array( 'result' => ($multi === $tag->isMulti()), 'is_multi' => $tag->isMulti(), ); $Serializer = $app['Core']['Serializer']; return new Response( $Serializer->serialize($datas, 'json') , 200 , array('Content-Type' => 'application/json') ); }); $controllers->get('/checkreadonly/', function() use ($app, $appbox) { $request = $app['request']; $readonly = ($request->get('readonly') === 'true'); $tag = \databox_field::loadClassFromTagName($request->get('source')); $datas = array( 'result' => ($readonly !== $tag->isWritable()), 'is_readonly' => ! $tag->isWritable(), ); $Serializer = $app['Core']['Serializer']; return new Response( $Serializer->serialize($datas, 'json'), 200, array('Content-Type' => 'application/json') ); }); return $controllers; } }