Get list of membership types.

@return array
The list of membership types keyed by type ID.
549449
public function getMembershipTypes() {
    $types = [];

    foreach ($this->getMembershipPriceMatrix() as $membership_type) {
      $types[$membership_type['id']] = [
        'title' => $membership_type['title'],
        'description' => $membership_type['description'],
      ];
    }

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

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

    return $accountTypes;
  }
690414
public function get_types_for_js() {
		$types = array();
		$names = array();

		foreach ( $this->types as $type ) {
			$types[ $type->id ] = $type->get_props();
			$names[ $type->id ] = $type->name;
		}

		array_multisort( $names, SORT_ASC, $types );

		return $types;
	}
579431
public function geti18nTypes()
    {
        $i18nTypes = [];
        // Get translatable labels
        foreach ($this->Types as $key => $label) {
            $i18nTypes[$key] = _t(__CLASS__ . '.TYPE'.strtoupper($key), $label);
        }
        $this->extend('updatei18nTypes', $i18nTypes);
        return $i18nTypes;
    }
18117
final public static function getMembers(): array
    {
        if (!isset(self::$constants[static::class])) {
            $reflection = new ReflectionClass(static::class);
            $constants = self::sortConstants($reflection);
            self::guardConstants($constants);
            self::$constants[static::class] = $constants;
        }

        return self::$constants[static::class];
    }
1354440
public function getTypes()
    {
        $schema = StaticSchema::inst();
        $tree = array_merge(
            [$this->rootClass],
            $schema->getDescendants($this->rootClass)
        );

        return array_map(function ($class) use ($tree, $schema) {
            return $schema->typeNameForDataObject($class);
        }, $tree);
    }
911613
public function getPrimaryKeyList()
    {
        $ids = [];
        if (count($this) > 0) {
            foreach ($this as $row) {
                $ids[] = $row->getPrimaryKeyValue();
            }
        }
        return $ids;
    }
1080199
public function getAll() 
    {
        return [
            self::ENTRY_ID         => $this->getId(),
            self::ENTRY_NAME       => $this->getName(),
            self::ENTRY_TYPE       => $this->getType(),
        ];
    }
142929
public function getMemberNames()
    {
        $members = [];

        $dns = $this->getAttribute($this->schema->member()) ?: [];

        foreach ($dns as $dn) {
            $exploded = Utilities::explodeDn($dn);

            if (array_key_exists(0, $exploded)) {
                $members[] = $exploded[0];
            }
        }

        return $members;
    }
504655
public function getTypes()
    {
        $classes = parent::getTypes();

        foreach ($classes as $k => &$definition) {

            if (empty($definition[$k]['properties'])) {
                unset($classes[$k]);
                continue;
            }

            $properties = array_filter(array_map(function ($property) {

                if (!empty($property['validation'])) {


                    foreach ($property['validation'] as &$rule){
                        foreach ($rule as $type => &$item) {

                            if ($type === 'Valid') {
                                continue;
                            } else {
                                if (!is_array($item)){
                                    $item = [];
                                }
                                $item['groups'] = ['xsd_rules'];
                            }

                        }
                        unset($item);
                    }
                    unset($rule);

                    return $property['validation'];
                }


                return null;
            }, $definition[$k]['properties']));

            if (empty($properties)) {
                unset($classes[$k]);
                continue;
            }

            $definition[$k] = [
                'properties' => $properties
            ];
        }

        return $classes;
    }
165972
public static function getTypes()
    {
        return [
            self::TYPE_VCS,
            self::TYPE_GIT,
            self::TYPE_GIT_BITBACKET,
            self::TYPE_GITHUB,
            self::TYPE_GITLAB,
        ];
    }
402996
public function getTypes()
    {
        $types = $this->config()->get('types');
        $i18nTypes = array();
        $allowed_types = $this->config()->get('allowed_types');

        if ($this->allowed_types) {
            // Prioritise local field over global settings
            $allowed_types = $this->allowed_types;
        }

        if ($allowed_types) {
           foreach ($allowed_types as $type) {
                if (!array_key_exists($type, $types)) {
                    user_error("{$type} is not a valid link type");
                }
            }

            foreach (array_diff_key($types, array_flip($allowed_types)) as $key => $value) {
                unset($types[$key]);
            }
        }

        // Get translatable labels
        foreach ($types as $key => $label) {
            $i18nTypes[$key] = _t('Links.TYPE'.strtoupper($key), $label);
        }
        $this->extend('updateTypes', $i18nTypes);
        return $i18nTypes;
    }
1100480
public static function getList()
    {
        $db = Database::connection();
        $handles = $db->GetCol('select cnvRatingTypeHandle from ConversationRatingTypes order by cnvRatingTypeHandle asc');
        $types = array();
        foreach ($handles as $handle) {
            $ratingType = static::getByHandle($handle);
            if (is_object($ratingType)) {
                $types[] = $ratingType;
            }
        }

        return $types;
    }
1138521
protected function getCustomMappingTypes()
    {
        $mappingTypes = (array) $this->getOption('custom_mapping_types');

        return array_filter(
            $mappingTypes,
            function ($name) {
                return is_string($name);
            },
            ARRAY_FILTER_USE_KEY
        );
    }
1038609
public function get_key_list() {
        $keys = array();
        foreach ($this->collection as $node) {
            $keys[] = $node->key;
        }
        return $keys;
    }
824579
public static function getIdList(): array
    {
        $list = [];
        foreach (self::getAll() as $tree) {
            $list[$tree->id] = $tree->title;
        }

        return $list;
    }
709179
public function getMemberOf()
    {
        $dns = $this->getAttribute($this->schema->memberOf());

        // Normalize returned distinguished names if the attribute is null.
        return is_array($dns) ? $dns : [];
    }