Exemple #1
0
 /**
  * Get config type options.
  *
  * @return array
  *
  * @SuppressWarnings(PHPMD.Superglobals)
  */
 public function getConfigTypes()
 {
     \Controller::loadLanguageFile('tl_bootstrap_config');
     $options = array();
     $collection = BootstrapConfigModel::findBy(array('(type = ? OR type=?)'), array('form_widget', 'form'), array('order' => 'name'));
     if ($collection) {
         foreach ($collection as $model) {
             $type = isset($GLOBALS['TL_LANG']['bootstrap_config_type'][$model->type]) ? $GLOBALS['TL_LANG']['bootstrap_config_type'][$model->type] : $model->type;
             $options[$model->id] = sprintf('%s (%s): %s %s (%s)', $model->getRelated('pid')->name, $model->pid, $type, $model->name, $model->id);
         }
     }
     return $options;
 }