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()); } }
/** * 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; }
/** * @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; }