public function gridsforpage(SS_HTTPRequest $r) {
		$pageid = (int) $r->requestVar('pageid');
		return Convert::array2json($this->panel->getGridFieldsFor(SiteTree::get()->byID($pageid)));
	}
public function gridsforpage(SS_HTTPRequest $r) {
		$pageid = (int) $r->requestVar('pageid');
		return Convert::array2json($this->panel->getGridFieldsFor(SiteTree::get()->byID($pageid)));
	}
public function gridsforpage ( SS_HTTPRequest $ r ) { $ pageid = ( int ) $ r -> requestVar ( 'pageid' ) ; return Convert :: array2json ( $ this -> panel -> getGridFieldsFor ( SiteTree :: get ( ) -> byID ( $ pageid ) ) ) ; }
Given a requested page, get the GridField names and provide a JSON response

@param SS_HTTPRequest The request object
@return string
Given a requested page get the GridField names and provide a JSON response