コード例 #1
0
 public function testGetLoggedInGroups()
 {
     $loggedInGroups = $this->groupManagement->getLoggedInGroups();
     foreach ($loggedInGroups as $group) {
         $this->assertNotEquals(GroupManagement::NOT_LOGGED_IN_ID, $group->getId());
         $this->assertNotEquals(GroupManagement::CUST_GROUP_ALL, $group->getId());
     }
 }
コード例 #2
0
 /**
  * Retrieve customer groups as array
  *
  * @return array
  */
 public function toOptionArray()
 {
     if (!$this->_options) {
         $groups = $this->_groupManagement->getLoggedInGroups();
         $this->_options = $this->_converter->toOptionArray($groups, 'id', 'code');
     }
     return $this->_options;
 }
コード例 #3
0
ファイル: Group.php プロジェクト: pradeep-wagento/magento2
 /**
  * @return array
  */
 public function toOptionArray()
 {
     if (!$this->_options) {
         $groups = $this->_groupManagement->getLoggedInGroups();
         $this->_options = $this->_converter->toOptionArray($groups, 'id', 'code');
         array_unshift($this->_options, ['value' => '', 'label' => __('-- Please Select --')]);
     }
     return $this->_options;
 }