Beispiel #1
0
 private static function markerOptions(array $parameters, $location)
 {
     // Begins window
     $xmlOutput = DataCenterXml::open('div', array('class' => 'window'));
     // Adds heading
     $xmlOutput .= DataCenterXml::div(array('class' => 'heading'), DataCenterXml::link($location->get('name'), array('page' => 'facilities', 'type' => 'location', 'action' => 'view', 'id' => $location->getId())));
     // Gets number of spaces in location
     $numSpaces = DataCenterDB::numSpaces(DataCenterDB::buildCondition('facility', 'space', 'location', $location->getId()));
     // Adds body
     $xmlOutput .= DataCenterXml::div(array('class' => 'body'), DataCenterXml::div(array('class' => 'region'), $location->get('region')) . DataCenterXml::div(array('class' => 'spaces'), DataCenterUI::message('label', 'num-spaces', $numSpaces)));
     // Ends window
     $xmlOutput .= DataCenterXml::close('div');
     // Returns JavaScript object of options
     return DataCenterJs::toObject(array('content' => $xmlOutput));
 }