コード例 #1
0
 /**
  * Generates a drop down box listing all crypto profiles
  *
  * @param  integer current crypto profile (or null if no current profile)
  * @param string element name
  * @return string
  */
 public function cryptoSelect($cryptoID, $name = 'cryptoID')
 {
     $options[0] = 'none';
     $cryptos = CryptoModel::getAllProfiles();
     foreach ($cryptos as $crypto) {
         $profileName = $this->view->h($crypto->name);
         if (!isset($options[$crypto->cryptoID])) {
             $options[$crypto->cryptoID] = $profileName;
         }
     }
     return $this->view->formSelect($name, $cryptoID, null, $options);
 }
コード例 #2
0
ファイル: CryptoModelTest.php プロジェクト: humansky/qframe
 public function testGetAllProfilesProducesCryptoModel()
 {
     $cryptos = CryptoModel::getAllProfiles();
     $this->assertTrue($cryptos[0] instanceof CryptoModel);
 }