Returns the tool types.

@param bool $orphanedonly Retrieve only tool proxies that do not have a corresponding tool type
@return array of tool types
@since Moodle 3.1
@throws moodle_exception
189572
public static function get_tool_proxies($orphanedonly) {
        global $PAGE;
        $params = self::validate_parameters(self::get_tool_proxies_parameters(),
                                            array(
                                                'orphanedonly' => $orphanedonly
                                            ));
        $orphanedonly = $params['orphanedonly'];

        $proxies = array();
        $context = context_system::instance();

        self::validate_context($context);
        require_capability('moodle/site:config', $context);

        $proxies = lti_get_tool_proxies($orphanedonly);

        return array_map('serialise_tool_proxy', $proxies);
    }
1218268
protected function _buildVariantSelectionsList($aVarSelects, $aSelections)
    {
        // creating selection lists
        foreach ($aVarSelects as $iKey => $sLabel) {
            $aVariantSelections[$iKey] = oxNew(\OxidEsales\Eshop\Application\Model\VariantSelectList::class, $sLabel, $iKey);
        }

        // building variant selections
        foreach ($aSelections as $aLineSelections) {
            foreach ($aLineSelections as $oPos => $aLine) {
                $aVariantSelections[$oPos]->addVariant($aLine['name'], $aLine['hash'], $aLine['disabled'], $aLine['active']);
            }
        }

        return $aVariantSelections;
    }
814541
public function getFilterOptions($idList, $usedOnly, &$arrCount = null)
    {
        if (!$this->isFilterOptionRetrievingPossible($idList)) {
            return [];
        }

        $idColumn = $this->getIdColumn();
        $builder  = $this->getConnection()->createQueryBuilder();
        $builder
            ->setParameter('attId', $this->get('id'))
            ->from($this->getTagSource(), 'v')
            ->leftJoin(
                'v',
                'tl_metamodel_tag_relation',
                'r',
                '(r.att_id=:attId) AND (r.value_id=v.' . $idColumn . ')'
            )
            ->groupBy('v.' . $idColumn)
            ->orderBy('v.' . $this->getSortingColumn());

        if ($usedOnly) {
            $builder->select('COUNT(v.' . $idColumn . ') AS mm_count');
            if (!empty($idList)) {
                $builder
                    ->where('r.item_id IN (:valueIds)')
                    ->setParameter('valueIds', $idList, Connection::PARAM_STR_ARRAY);
            }
        } else {
            $builder->select('COUNT(r.value_id) AS mm_count');
            if (!empty($idList)) {
                $builder
                    ->where('v.' . $idColumn . ' IN (:valueIds)')
                    ->setParameter('valueIds', $idList, Connection::PARAM_STR_ARRAY);
            }
        }
        $builder->addSelect('v.*');

        if ($additionalWhere = $this->getWhereColumn()) {
            $builder->andWhere($additionalWhere);
        }

        $aliasColumn = $this->getAliasColumn();
        $valueColumn = $this->getValueColumn();
        $result      = [];
        foreach ($builder->execute()->fetchAll(\PDO::FETCH_ASSOC) as $value) {
            if ($arrCount !== null) {
                $arrCount[$value[$aliasColumn]] = $value['mm_count'];
            }
            $result[$value[$aliasColumn]] = $value[$valueColumn];
        }

        return $result;
    }
1159116
public function getList()
    {
        $list = new \BearFramework\DataList();
        foreach ($this->data as $addon) {
            $list[] = clone($addon);
        }
        return $list;
    }
625169
public static function get_undeletable_block_types() {
        global $CFG;
        $undeletableblocks = false;
        if (isset($CFG->undeletableblocktypes)) {
            $undeletableblocks = $CFG->undeletableblocktypes;
        }

        if (empty($undeletableblocks)) {
            return array();
        } else if (is_string($undeletableblocks)) {
            return explode(',', $undeletableblocks);
        } else {
            return $undeletableblocks;
        }
    }
839713
protected function getBooleanSelectList($includeNull = false)
    {
        $results = array();
        if( $includeNull ) {
            $results[ '' ] = Translate::recursive('common.both');
        }

        $results[ 0 ] = Translate::recursive('common.no');
        $results[ 1 ] = Translate::recursive('common.yes');

        return $results;
    }
1340332
public function getProxyBindings()
	{
		if($this->proxyTypes === NULL)
		{
			$this->proxyTypes = [];
			
			foreach($this->bindings as $binding)
			{
				$scope = $binding->getScope();
		
				if($scope === NULL)
				{
					continue;
				}
		
				if(Singleton::class == $scope)
				{
					continue;
				}
		
				$this->proxyTypes[strtolower($binding->getTypeName())] = $binding;
			}
		}
		
		return $this->proxyTypes;
	}
582534
public function get_page_type_strings($type=null, $special=true) {
        $types = array();
        foreach ($this->types as $pagetype) {
            if (($type===null || $pagetype->type===$type) && ($special===true || $pagetype->is_standard())) {
                $types[$pagetype->typeid] = $pagetype->typestring;
            }
        }
        return $types;
    }
125754
public function get_items($hasvalueonly = false) {
        global $DB;
        if ($this->allitems === null) {
            if ($this->templateid) {
                $this->allitems = $DB->get_records('feedback_item', ['template' => $this->templateid], 'position');
            } else {
                $this->allitems = $DB->get_records('feedback_item', ['feedback' => $this->feedback->id], 'position');
            }
            $idx = 1;
            foreach ($this->allitems as $id => $item) {
                $this->allitems[$id]->itemnr = $item->hasvalue ? ($idx++) : null;
            }
        }
        if ($hasvalueonly && $this->allitems) {
            return array_filter($this->allitems, function($item) {
                return $item->hasvalue;
            });
        }
        return $this->allitems;
    }
463816
public static function getAutoHandledOrphans($flatten = true, $stripPrefix = 1)
    {
        $orphans = static::getOrphans();

        foreach ($orphans as $key => $value) {
            $value = explode('.', $key);

            $value = array_map('ucfirst', $value);

            foreach (range(1, $stripPrefix) as $i) {
                array_shift($value);
            }

            $value = implode(' ', $value);

            $orphans[$key] = $value;
        }

        if (!$flatten) {
            $reg = new Structure();

            foreach ($orphans as $key => $value) {
                $reg->set($key, $value);
            }

            $orphans = $reg->toArray();
        }

        return $orphans;
    }
1115863
public function xgetFieldTypes($onlyUsable = false)
    {
        $fieldTypes = array_keys($this->_getFields());

        if ($onlyUsable) {
            unset($fieldTypes['root']);
            unset($fieldTypes['referenceroot']);
            unset($fieldTypes['reference']);
        }

        sort($fieldTypes);

        return $fieldTypes;
    }
109929
public static function get_request_type_string($requesttype) {
        $types = self::get_request_types();
        if (!isset($types[$requesttype])) {
            throw new moodle_exception('errorinvalidrequesttype', 'tool_dataprivacy');
        }
        return $types[$requesttype];
    }
607520
public function getMixableMethods($exclude = array())
    {
        $exclude = array_merge($exclude, array('getNodes'));
        $methods = parent::getMixableMethods($exclude);

        return $methods;
    }
126861
public static function get_areas($tagcollid = null, $enabledonly = false) {
        global $DB;
        $cache = cache::make('core', 'tags');
        if (($itemtypes = $cache->get('tag_area')) === false) {
            $colls = core_tag_collection::get_collections();
            $defaultcoll = reset($colls);
            $itemtypes = array();
            $areas = $DB->get_records('tag_area', array(), 'component,itemtype');
            foreach ($areas as $area) {
                if ($colls[$area->tagcollid]->component) {
                    $area->locked = true;
                }
                $itemtypes[$area->itemtype][$area->component] = $area;
            }
            $cache->set('tag_area', $itemtypes);
        }
        if ($tagcollid || $enabledonly) {
            $rv = array();
            foreach ($itemtypes as $itemtype => $it) {
                foreach ($it as $component => $v) {
                    if (($v->tagcollid == $tagcollid || !$tagcollid) && (!$enabledonly || $v->enabled)) {
                        $rv[$itemtype][$component] = $v;
                    }
                }
            }
            return $rv;
        }
        return $itemtypes;
    }
1366938
public function getMethods($alsoProtected = true, $alsoPrivate = true, $alsoHerited = false)
    {
        $ar = parent::getMethods();
        foreach ($ar as $method) {
            if (substr($method->name, 0, 2) == '__' ||
                $method->isAbstract() ||
                $method->isConstructor() ||
                $method->isDestructor()) {
                continue;
            }
            $m = new IPReflectionMethod($this->classname, $method->name);
            if ((!$m->isPrivate() || $alsoPrivate) && (!$m->isProtected() || $alsoProtected) && (($m->getDeclaringClass()->name == $this->classname) || $alsoHerited)) {
                $this->methods[$method->name] = $m;
            }
        }
        ksort($this->methods);

        return $this->methods;
    }
91637
public function getFilterOptions($idList, $usedOnly, &$arrCount = null)
    {
        $options = parent::getFilterOptions($idList, $usedOnly, $arrCount);

        foreach ($options as $k => $v) {
            $options[$k] = $this->getCountryLabel($k);
        }

        // Sort the result, see #11
        \asort($options, SORT_LOCALE_STRING);

        return $options;
    }
1373395
public function getLinksArray($includeOnlyVisited = false){
        $links = $this->getLinks();
        
        if($includeOnlyVisited === true){
            $links = array_filter($links, function (Link $linkObj) {
                /*@var $linkObj Link */
                return $linkObj->isVisited() === true;
            });
        }
        
        return array_map(function(Link $link){
            return [
              'fullUrl' => $link->getAbsoluteUrl(),
              'uri' => $link->getPath(),
              'metaInfo' => $link->getMetaInfoArray(),
              'parentLink' => $link->getParentUrl(),
              'statusCode' => $link->getStatusCode(), 
              'status' => $link->getStatus(), 
              'contentType' => $link->getContentType(), 
              'errorInfo' => $link->getErrorInfo(),
              'crawlDepth' => $link->getCrawlDepth(),              
            ];
        },$links);
    }