コード例 #1
1
ファイル: Generic.php プロジェクト: pradeep-wagento/magento2
 /**
  * Returns array to be used in multiselect on back-end
  *
  * @return array
  */
 public function toOptionArray()
 {
     $options = [];
     $codes = $this->shippingUsps->getCode($this->code);
     if ($codes) {
         foreach ($codes as $code => $title) {
             $options[] = ['value' => $code, 'label' => __($title)];
         }
     }
     return $options;
 }
コード例 #2
0
 public function testGetCodeBool()
 {
     $this->assertFalse($this->_model->getCode('test_code'));
 }