map info element improvements
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user