public function getGroupsAccounts()
  {
    //Is Group: Further accounts can be made under Groups, but entries can be made against non-Groups
    $accounts = array();

    $this->Account->byOrganization($this->AuthenticationManager->getCurrentUserOrganizationId())->each(function($Account) use (&$accounts)
    {
      if($Account->is_group)
      {
        array_push($accounts, array('label'=> $Account->key . ' ' . $Account->name, 'value'=>$Account->id));
      }
    });

    return $accounts;
  }
public function getGroupsAccounts()
  {
    //Is Group: Further accounts can be made under Groups, but entries can be made against non-Groups
    $accounts = array();

    $this->Account->byOrganization($this->AuthenticationManager->getCurrentUserOrganizationId())->each(function($Account) use (&$accounts)
    {
      if($Account->is_group)
      {
        array_push($accounts, array('label'=> $Account->key . ' ' . $Account->name, 'value'=>$Account->id));
      }
    });

    return $accounts;
  }
public function getGroupsAccounts ( ) { //Is Group: Further accounts can be made under Groups, but entries can be made against non-Groups $ accounts = array ( ) ; $ this -> Account -> byOrganization ( $ this -> AuthenticationManager -> getCurrentUserOrganizationId ( ) ) -> each ( function ( $ Account ) use ( & $ accounts ) { if ( $ Account -> is_group ) { array_push ( $ accounts , array ( 'label' => $ Account -> key . ' ' . $ Account -> name , 'value' => $ Account -> id ) ) ; } } ) ; return $ accounts ; }
Get group organization accounts

@return array
An array of arrays as follows: array( array('label'=>$name0, 'value'=>$id0), array('label'=>$name1, 'value'=>$id1),…)
Get group organization accounts