get all client companies
@return array
557223
public function getClientCompanies(){
         if($this->_aUserCompanies === FALSE){
            //$this->_aUserCompanies = CcucUserCompany::model()->getUserCompnies(Yii::app()->getModule('user')->user()->id,$this->ccuc_status);
                 $sql = "
                        SELECT DISTINCT
                          ccmp_id,
                          ccmp_name 
                        FROM
                          ccuc_user_company 
                          INNER JOIN ccmp_company 
                            ON ccmp_id = ccuc_ccmp_id 
                        WHERE ccuc_person_id = ".Yii::app()->getModule('user')->user()->profile->person_id."
                          AND ccuc_status = '".$this->ccuc_status."' 
                        ORDER BY 
                          ccmp_name 
                    ";
            $this->_aUserCompanies = Yii::app()->db->createCommand($sql)->queryAll();            
         }
         return $this->_aUserCompanies;
     }
188792
public function getLists()
    {
        $settings = CmService::$plugin->getSettings();

        try {
            $auth = array(
                'api_key' => (string)$settings->apiKey);
            $client = new \CS_REST_Clients(
                $settings->clientId,
                $auth);

            $result = $client->get_lists();

            if($result->was_successful()) {
                $body = array();
                foreach ($result->response as $list) {
                    $body[] = $list;
                }
                return [
                    'success' => true,
                    'statusCode' => $result->http_status_code,
                    'body' => $body
                ];
            } else {
                return [
                    'success' => false,
                    'statusCode' => $result->http_status_code,
                    'reason' => $result->response
                ];
            }
        } catch (\Exception $e) {
            return [
                'success' => false,
                'reason' => $e->getMessage()
            ];
        }
    }
1126814
public function getSuppliers()
  {
    $suppliers = array();

    $this->Supplier->byOrganization($this->AuthenticationManager->getCurrentUserOrganizationId())->each(function($Supplier) use (&$suppliers)
    {
      array_push($suppliers, array('label'=> $Supplier->name , 'value'=>$Supplier->id));
    });

    return $suppliers;
  }
918112
public function getClientsAndContentTypesAsChoices(): array
    {
        $clientsAndContentTypes = [];

        foreach ($this->clientsConfig as $clientName => $clientConfig) {
            /** @var \Contentful\Delivery\Client $client */
            $client = $clientConfig['service'];

            $clientsAndContentTypes[$client->getSpace()->getName()] = $clientName;
            foreach ($client->getContentTypes()->getItems() as $contentType) {
                /* @var \Contentful\Delivery\Resource\ContentType $contentType */
                $clientsAndContentTypes['>  ' . $contentType->getName()] = $clientName . '|' . $contentType->getId();
            }
        }

        return $clientsAndContentTypes;
    }
356746
public function getLocations() {
    $locations = [];

    $cid = __METHOD__;
    if ($cache = $this->cache->get($cid)) {
      return $cache->data;
    }

    $branches = $this->client->getBranches(['limit' => 100]);
    foreach ($branches as $branch) {
      $locations[$branch->id] = $branch->name;
    }

    $this->cache->set($cid, $locations);
    return $locations;
  }
756704
public function getCompanyFields()
    {
        $fields = array(
            'company' => TextField::create($this->getFieldName('company'), _t('SilverStripe\Omnipay\PaymentForm.Company', 'Company'))
        );

        $this->cullForGateway($fields);

        return FieldList::create($fields);
    }
1300468
public function getAll(){
        $rest = $this->getService( self::API_WIFI_MAC_FILTER);
        $rest->GET();

        return $rest->getResultAsArray( models\WiFi\MacFilter::class);
    }
772300
public function getAllServices()
    {
        $result = array();
        foreach ($this->getExtensions() as $handle) {
            $result[$handle] = $this->getService($handle);
        }

        return $result;
    }
342222
protected function getClientOptions()
    {
        $options = $this->clientOptions;
        
        if ($this->items !== null)
            $options['core']['data'] = $this->items;
        
        $options['core']['check_callback'] = isset($options['core']['check_callback']) ? $options['core']['check_callback'] : true;
                
        return $options;
    }
1188197
public static function getAllGroupClientIdCount()
    {
        $group_client_map = static::getAllGroupClientIdList();
        $group_client_count_map = array();
        foreach ($group_client_map as $group_id => $client_id_list) {
            $group_client_count_map[$group_id] = count($client_id_list);
        }
        return $group_client_count_map;
    }
316542
public function fetchAll() {
		if ($this->selection) {
			/** @var ActiveRow $entity */
			foreach ($this->selection as $entity) {
				$this->createEntity($entity);
			}
		}

		return $this->rows;
	}
1033415
public function getAll()
    {
        $result = $this->wsClient->invokeOperation('listtypes', [ ], 'GET');
        $modules = $result[ 'types' ];

        $result = array();
        foreach ($modules as $moduleName) {
            $result[ $moduleName ] = [ 'name' => $moduleName ];
        }
        return $result;
    }
795687
public function getClientActiveProjects($client_id)
    {
        $result = $this->getClientProjects( $client_id );
        if ( $result->isSuccess() ) {
            $projects = array();
            foreach ($result->data as $project) {
                if ($project->active == "true") {
                    $projects[$project->id] = $project;
                }
            }
            $result->data = $projects;
        }

        return $result;
    }
728015
public function payments()
    {
        return $this->client->customerPayments->listFor($this, null, null, $this->getPresetOptions());
    }
1093629
def get_all_clients(self, params=None):
        
        return self._iterate_through_pages(
            get_function=self.get_clients_per_page,
            resource=CLIENTS,
            **{'params': params}
        )
1149703
public function _getWishlist()
    {
        $customerId = (int) $this->getRequest()->getParam('customer_id');
        if (!$customerId) {
            return [];
        }

        $customer = $this->customerFactory->create();
        $this->customerResource->load($customer, $customerId);
        if (! $customer->getId()) {
            return [];
        }

        return $this->wishlist->getWishlistsForCustomer($customerId);
    }
272269
public function getCustomerTaxClasses()
    {
        /** @var \Magento\Tax\Model\ResourceModel\TaxClass\Collection $taxCollection */
        $classes       = [];
        $defaultTaxId  = $this->customerGroup->getNotLoggedInGroup()->getTaxClassId();
        $taxCollection = $this->taxClass->getCollection();
        $taxCollection->setClassTypeFilter(ClassModel::TAX_CLASS_TYPE_CUSTOMER);

        /** @var ClassModel $tax */
        foreach ($taxCollection as $tax) {
            $classes[] = [
                'id'         => $tax->getId(),
                'key'        => $tax->getClassName(),
                'is_default' => intval($defaultTaxId == $tax->getId()),
            ];
        }

        return $classes;
    }