
Untitled
By: a guest on
May 25th, 2012 | syntax:
None | size: 0.76 KB | hits: 16 | expires: Never
function _mapal_buldings () {
drupal_add_css (drupal_get_path ('module', 'mapal') . '/css/mapal_base_view.css');
module_load_include ('inc', 'mapal', 'includes/BaseModel.class');
module_load_include ('inc', 'mapal', 'includes/BuildingsModel.class');
$infos = mapal\BuildingsModel::getBuildingsInfos(mapal\BaseModel::getSelectedBaseID());
$form = array ();
$form['base_view'] = array (
'#type' => 'theme',
'#theme' => 'mapal_base_view',
'#buildings' => $infos
);
foreach ($infos as $info) {
_mapal_buildings_create_building_element ($form['shop_view'], $info);
}
$form['buy'] = array (
'#type' => 'submit',
'#value' => t('Buy selected buildings')
);
return $form;
}