convert to php array $subtarget = json_decode($_REQUEST['subtarget'], TRUE); if ($subtarget['object'] > 0) { // object is NOT undefined $structure = Factory::getObjectByID($subtarget['object']); // default object $defaultobject = array(); // read the data for the object $defaultobject['data'] = $structure->getDisplayData(); // read the data for the object's regions such as city name etc $defaultobject['regions'] = $structure->getDisplayRegions(); } } if (isset($subtarget['type'])) { // type of the pick object call has been set } else { // type has not been set $subtarget['type'] = ""; } if ($subtarget['type'] == "fileconnection" && $subtarget['fileid'] > 0) { // a file is connected to an object // get file classes require_once CROOT."/midware/File.class.php"; require_once CROOT."/midware/GenerateURL.class.php"; // loading basic info for the file $fileid = intval($subtarget['fileid']); $file = new File($fileid); $data = $file->getData(); // get the access rights of the current user for the given file $content_vars['access'] = Tools::checkAccessrights( array( "type" => "file", "id" => $fileid, "currentaccountid" => $_SESSION['account_id'], "setupaccountid" => $data['setupaccountid'] ) ); } ?>
";
var_dump($objects);
echo "";
*/
if (count($objects) > 0) {
// some objects were found
$objectsidarray = array();
foreach ($objects as $object) {
$objectsidarray[] = $object['objectid'];
}
require_once CROOT."/midware/Elasticsearch.class.php";
// load structures
$elasticparams = array(
"index" => "structures",
"type" => "structure",
"id" => $objectsidarray
);
$vars['elasticresult'] = Elasticsearch::mgetElasticDataById($elasticparams);
/*
echo "";
var_dump($vars['elasticresult']['query']['docs']);
echo "";
die();
*/
}
#var_dump($objects);
?>