map info element improvements

This commit is contained in:
exodus4d
2015-04-21 22:58:40 +02:00
parent 1be444cc32
commit fc033ed7c4
36 changed files with 1450 additions and 813 deletions

View File

@@ -116,6 +116,24 @@ class MapModel extends BasicModel{
return $systems;
}
/**
* search for a system by id
* @param $systemId
* @return null
*/
public function getSystem( $systemId ){
$systems = $this->getSystems();
$searchSystem = null;
foreach($systems as $system){
if($system->id == $systemId){
$searchSystem = $system;
break;
}
}
return $searchSystem;
}
/**
* get all system data for all systems in this map
* @return array