コード例 #1
0
 public function testToOptionArray()
 {
     $this->assertNotEmpty($this->_collection->toOptionArray());
     foreach ($this->_collection->toOptionArray() as $item) {
         $this->assertArrayHasKey('value', $item);
         $this->assertArrayHasKey('label', $item);
     }
 }
コード例 #2
0
ファイル: Collection.php プロジェクト: Atlis/docker-magento2
 /**
  * Prepare select for load
  *
  * @return $this
  */
 protected function _initSelect()
 {
     parent::_initSelect();
     $this->addFieldToFilter('role_type', RoleGroup::ROLE_TYPE);
     return $this;
 }