src/Kunstmaan/DashboardBundle/Helper/Google/Analytics/ConfigHelper.php
public function getAccounts()
    {
        $accounts = $this->serviceHelper->getService()->management_accounts->listManagementAccounts()->getItems();
        $data = array();

        foreach ($accounts as $account) {
            $data[$account->getName()] = array(
                    'accountId' => $account->getId(),
                    'accountName' => $account->getName(),
                );
        }
        ksort($data);

        return $data;
    }
public function getAccounts()
    {
        $accounts = $this->serviceHelper->getService()->management_accounts->listManagementAccounts()->getItems();
        $data = array();

        foreach ($accounts as $account) {
            $data[$account->getName()] = array(
                    'accountId' => $account->getId(),
                    'accountName' => $account->getName(),
                );
        }
        ksort($data);

        return $data;
    }
public function getAccounts ( ) { $ accounts = $ this -> serviceHelper -> getService ( ) -> management_accounts -> listManagementAccounts ( ) -> getItems ( ) ; $ data = array ( ) ; foreach ( $ accounts as $ account ) { $ data [ $ account -> getName ( ) ] = array ( 'accountId' => $ account -> getId ( ) , 'accountName' => $ account -> getName ( ) , ) ; } ksort ( $ data ) ; return $ data ; }
Get a list of all available accounts

@return array $data A list of all properties
Get a list of all available accounts