Get all active organizations

@return array List of the active organizations
516545
public function getOrganizations()
    {
        $sql = "SELECT gor_id_organization, gor_name
                    FROM gems__organizations
                    WHERE gor_active = 1
                    ORDER BY gor_name";

        try {
            $organizations = $this->_getSelectPairsCached(__FUNCTION__, $sql, null, 'organizations', 'natsort');
        } catch (\Exception $exc) {
            // Intentional fallthrough when no db present
            $organizations = array();
        }

        return $organizations;
    }
849793
public function getClients()
  {
    $clients = array();

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

    return $clients;
  }
533085
public function getMembers()
    {
        if (!array_key_exists(self::MEMBERS, $this->group)) {
            throw new \Exception('Could not get group members from group id.');
        }
        return $this->group[self::MEMBERS];
    }
657319
public function getInactiveProjects()
    {
        $result = $this->getProjects();
        if ( $result->isSuccess() ) {
            $projects = array();
            foreach ($result->data as $project) {
                if ($project->active == "false") {
                    $projects[$project->id] = $project;
                }
            }
            $result->data = $projects;
        }

        return $result;
    }
419102
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;
  }
664284
public function getMembers()
    {
        if (empty($this->aMembers)) {
            $this->aMembers = [];
            if ($this->id) {
                foreach (Sked::getEventMembers($this->id) as $aEventMember)
                    $this->aMembers[$aEventMember['member_id']] = $aEventMember;
            }
        }
        return $this->aMembers;
    }
455187
public function get_groups() {
		$groups = array(
			array(
				'id'   => 'a11y',
				'name' => __( 'Accessibility', 'icon-picker' ),
			),
			array(
				'id'   => 'brand',
				'name' => __( 'Brand', 'icon-picker' ),
			),
			array(
				'id'   => 'chart',
				'name' => __( 'Charts', 'icon-picker' ),
			),
			array(
				'id'   => 'currency',
				'name' => __( 'Currency', 'icon-picker' ),
			),
			array(
				'id'   => 'directional',
				'name' => __( 'Directional', 'icon-picker' ),
			),
			array(
				'id'   => 'file-types',
				'name' => __( 'File Types', 'icon-picker' ),
			),
			array(
				'id'   => 'form-control',
				'name' => __( 'Form Controls', 'icon-picker' ),
			),
			array(
				'id'   => 'gender',
				'name' => __( 'Genders', 'icon-picker' ),
			),
			array(
				'id'   => 'medical',
				'name' => __( 'Medical', 'icon-picker' ),
			),
			array(
				'id'   => 'payment',
				'name' => __( 'Payment', 'icon-picker' ),
			),
			array(
				'id'   => 'spinner',
				'name' => __( 'Spinners', 'icon-picker' ),
			),
			array(
				'id'   => 'transportation',
				'name' => __( 'Transportation', 'icon-picker' ),
			),
			array(
				'id'   => 'text-editor',
				'name' => __( 'Text Editor', 'icon-picker' ),
			),
			array(
				'id'   => 'video-player',
				'name' => __( 'Video Player', 'icon-picker' ),
			),
			array(
				'id'   => 'web-application',
				'name' => __( 'Web Application', 'icon-picker' ),
			),
		);

		/**
		 * Filter genericon groups
		 *
		 * @since 0.1.0
		 * @param array $groups Icon groups.
		 */
		$groups = apply_filters( 'icon_picker_fa_groups', $groups );

		return $groups;
	}
849613
public function getActiveViewsNames()
    {
        $names = [];

        if (is_array($this->getActiveViewsList())) {
            foreach ($this->getActiveViewsList() as $view) {
                $names[] = $view->getClassName();
            }
        }

        return $names;
    }
1074546
public function getRespondentOrganizations()
    {

        if (! $this->_hasVar('__allowedRespOrgs')) {
            $availableOrganizations = $this->util->getDbLookup()->getOrganizationsWithRespondents();
            $allowedOrganizations   = $this->getAllowedOrganizations();

            $this->_setVar('__allowedRespOrgs', array_intersect($availableOrganizations, $allowedOrganizations));
        }
        // \MUtil_Echo::track($this->_getVar('__allowedOrgs'));

        return $this->_getVar('__allowedRespOrgs');
    }
1312063
public function getAllMembers() {
        $this->roadMap;
        $this->resources;
        $result = array();
        foreach ($this->roadMap as $road) {
            /* @var $road SourceRoad */
            $result[$road->getMemberId()] = $road;
        }
        foreach ($this->resources as $resource) {
            /* @var $resource AbstractResourceFile */
            $result[$resource->getMemberId()] = $resource;
        }
        return $result;
    }
1104947
public function getAllGroups()
    {
        $result = new \Tx_Oelib_List();
        $groupsToProcess = $this->getGroups();

        do {
            $groupsForNextStep = new \Tx_Oelib_List();
            $result->append($groupsToProcess);
            /** @var \Tx_Oelib_Model_BackEndUserGroup $group */
            foreach ($groupsToProcess as $group) {
                $subgroups = $group->getSubgroups();
                /** @var \Tx_Oelib_Model_BackEndUserGroup $subgroup */
                foreach ($subgroups as $subgroup) {
                    if (!$result->hasUid($subgroup->getUid())) {
                        $groupsForNextStep->add($subgroup);
                    }
                }
            }
            $groupsToProcess = $groupsForNextStep;
        } while (!$groupsToProcess->isEmpty());

        return $result;
    }
523150
public function listActions()
    {
        $listActions = [];

        foreach ($this->listActions as $listAction) {
            $listActions[] = $this->getAction($listAction);
        }

        return $listActions;
    }
1242816
protected function _getActionGroups()
    {
        $action = $this->_action();
        $groups = $action->getConfig('scaffold.action_groups') ?: [];

        $groupedActions = [];
        foreach ($groups as $group) {
            $groupedActions[] = array_keys(Hash::normalize($group));
        }

        // add "primary" actions (primary should rendered as separate buttons)
        $groupedActions = (new Collection($groupedActions))->unfold()->toList();
        $groups['primary'] = array_diff(array_keys($this->_getAllowedActions()), $groupedActions);

        return $groups;
    }
1202551
public function getChildOrganizations($parentId = null)
    {
        static $children;

        if (is_null($parentId)) {
            return array();
        }

        if (! isset($children[$parentId])) {
            $organizations = $this->db->fetchPairs(
                    'SELECT gor_id_organization, gor_name
                        FROM gems__organizations
                        WHERE gor_active=1 AND gor_has_login=1 AND
                            (gor_accessible_by LIKE ' . $this->db->quote('%:' . $parentId . ':%') . ' OR
                                gor_id_organization = ' . $this->db->quote($parentId) .  ')
                            ORDER BY gor_name');

            natsort($organizations);

            $children[$parentId] = $organizations;
        }

        return $children[$parentId];
    }
480370
public function get_active()
    {
        if ($this->active !== null) {
            return $this->active;
        }

        if (!$this->sieve) {
            return $this->_set_error(self::ERROR_INTERNAL);
        }

        return $this->active = $this->sieve->getActive();
    }
643268
public function getAdminClasses()
    {
        $classCollection = [];

        if (!defined('static::ADMIN_KEY')) {
            return $classCollection;
        }

        $classCollection = $this->getSubAdminClasses(\Flare::config(static::ADMIN_KEY));

        return $classCollection;
    }
766515
public function getAllConnectedAccounts() {
		$accounts = array();
		foreach ($this->getAllAccountConnections() as $ac) {
			$accounts[] = $ac->getProperty('coid://accountgateways.cloudobjects.io/connectsTo');
		}
		return $accounts;
	}