public function runPreferencePlugin($sAdapterName, BsConfig $oVariable)
 {
     if (substr($oVariable->getKey(), 0, 13) != "MW::Flexiskin") {
         return array();
     }
     $api = new ApiMain(new DerivativeRequest($this->getRequest(), array('action' => 'flexiskin', 'type' => 'get'), false), true);
     $oResult = $api->execute();
     $aData = $api->getResultData();
     $aResult = array('options' => array(wfMessage('bs-flexiskin-defaultname')->plain() => 'default'));
     if (isset($aData['flexiskin']) && count($aData['flexiskin']) > 0) {
         foreach ($aData['flexiskin'] as $aConf) {
             $aResult['options'][$aConf['flexiskin_name']] = $aConf['flexiskin_id'];
         }
     }
     return $aResult;
 }
 /**
  * Callback for the preferences.
  * @param string $sAdapterName The curren Adapter name
  * @param BsConfig $oVariable The Variable
  * @return array The (MediaWiki) config array
  */
 public function runPreferencePlugin($sAdapterName, $oVariable)
 {
     switch ($oVariable->getKey()) {
         case 'MW::WantedArticle::Sort':
             return array('options' => array(wfMessage('bs-wantedarticle-pref-sort-time')->plain() => 'time', wfMessage('bs-wantedarticle-pref-sort-title')->plain() => 'title'));
             break;
         case 'MW::WantedArticle::Order':
             return array('options' => array(wfMessage('bs-wantedarticle-pref-order-asc')->plain() => 'ASC', wfMessage('bs-wantedarticle-pref-order-desc')->plain() => 'DESC'));
             break;
         default:
             return array();
             break;
     }
 }