Returns the layer structure for the map.
@param $intId
@param bool $blnIsSubLayer
@return array
978758
protected function getLayerList($intId, $blnIsSubLayer = false)
    {
        $arrLayer = array();

        if (!$blnIsSubLayer) {
            // Find the requested map
            $objMap = C4gMapsModel::findById($intId);

            // Only return map entries
            if ($objMap == null || !$objMap->is_map) {
                HttpResultHelper::NotFound();
            }
        }

        // Get all layers on the map
        $objLayers = C4gMapsModel::findPublishedByPid($intId);

        if ($objMap) {
            // append map itself as structure element
            if ($objMap->location_type != "none") {
                $mapLayer = $this->parseLayer($objMap);
                unset($mapLayer['raw']);
                $arrLayer[] = $mapLayer;
            }
        }

        if ($objLayers != null) {
            while ($objLayers->next()) {
                // workaround for incorrect model function
                if (!$objLayers->published) {
                    continue;
                }

                // do not return protected layers, to users without permission
                if ($objLayers->protect_element) {
                    if (C4GUtils::checkFrontendUserLogin() && !empty($objLayers->permitted_groups)) {
                        $permittedGroups = deserialize($objLayers->permitted_groups);
                        $userGroups = FrontendUser::getInstance()->groups;
                        if (sizeof(array_intersect($userGroups, $permittedGroups)) <= 0) {
                            continue;
                        }
                    } else {
                        continue;
                    }
                }
                if ($arrGetLayerData = $this->parseLayer($objLayers)) {
                    $arrLayerData = $arrGetLayerData;//$this->parseLayer($objLayers);
                    $arrLayerData['cssClass'] = $objLayers->cssClass;

                    if ($childLayerList = $this->getLayerList($arrLayerData['id'], true)) {
                        $arrLayerData['hasChilds'] = true;
                        $arrLayerData['childsCount'] = sizeof($childLayerList);
                        $arrLayerData['childs'] = $childLayerList;
                    } else if ($objLayers->location_type == 'folder') {
                        $folder = $this->getFolder($objLayers);
                        if ($folder != '') {
                            $dict = $this->layerContentService->getFolderDataPublic($objLayers);
                            $arrLayerData['hasChilds'] = true;
                            $arrLayerData['childsCount'] = count($dict);
                            $arrLayerData['childs'] = $dict;
                            unset($arrLayerData['raw']);
                            $arrLayer[] = $arrLayerData;
                            continue;
                        }
                    }
                    $arrLayerData['childs'] = $this->setChildHide($arrLayerData['childs'], $objLayers);

                    // HOOK: add custom logic
//                    $arrLayerData = $this->addCustomLogic($arrLayerData);
                    // only add if there is a result
                    if (is_array($arrLayerData) && count($arrLayerData) > 0) {
                        unset($arrLayerData['raw']);
                        $arrLayer[] = $arrLayerData;
                    }
                }
            }
        }
        return $arrLayer;
    }
980971
private function getChildsForLinkedLayer($layerId, $parentLayer)
    {
        $childLayers = C4gMapsModel::findPublishedByPid($layerId);
        $arrLayerData['childs'] = [];
        
        foreach ($childLayers as $childLayer) {
            if ($childLayer->location_type !== "none") {
                // we reached the "bottom" of the tree leaf
                $childData = $this->parseLayer($childLayer);
                $childData['pid'] = $parentLayer->id;
                $arrLayerData['childs'][] = $childData;
                $arrLayerData['hide'] = $parentLayer->data_hidelayer;
            } else {
                $currentChildLayer = $this->parseLayer($childLayer);
                // set correct pid for the contentless element
                $currentChildLayer['pid'] = $parentLayer->id;
                // $childLayer is the acutal existing layer.
                $arrChildData = $this->getChildsForLinkedLayer($childLayer->id, (object) $currentChildLayer);
                $currentChildLayer['childs'] = $arrChildData['childs'];
                $currentChildLayer['content'] = [];
                $currentChildLayer['hasChilds'] = count($currentChildLayer['childs']) > 0;
                $currentChildLayer['childsCount'] = count($currentChildLayer['childs']);
                $arrLayerData['childs'][] = $currentChildLayer;
            }
            
            $arrLayerData['content'] = [];
            $arrLayerData['hasChilds'] = count($arrLayerData['childs']) > 0;
            $arrLayerData['childsCount'] = count($arrLayerData['childs']);
        }
        
        return $arrLayerData;
    }
1302468
public static function getUnassignedBlockTypes($includeInternalBlockTypes = false)
    {
        $result = [];
        $app = Application::getFacadeApplication();
        $db = $app->make(Connection::class);
        $rs = $db->executeQuery(<<<EOT
select BlockTypes.btID
from BlockTypes
left join BlockTypeSetBlockTypes on BlockTypes.btID = BlockTypeSetBlockTypes.btID
left join BlockTypeSets on BlockTypeSetBlockTypes.btsID = BlockTypeSets.btsID
where BlockTypeSets.btsID is null
order by BlockTypes.btDisplayOrder asc
EOT
        );
        while (($btID = $rs->fetchColumn()) !== false) {
            $bt = BlockType::getByID($btID);
            if ($bt !== null) {
                if ($includeInternalBlockTypes || !$bt->isBlockTypeInternal()) {
                    $result[] = $bt;
                }
            }
        }

        return $result;
    }
157537
def get_images_layer(self, image_id):
        """"""
        return self._http_call(self.IMAGE_LAYER, get, image_id=image_id)
1101418
public static List<String> getVisibleServerLayerIds(MapModel mapModel) {
		List<String> layerIds = new ArrayList<String>();
		for (VectorLayer layer : mapModel.getVectorLayers()) {
			if (layer.isShowing()) {
				layerIds.add(layer.getServerLayerId());
			}
		}
		return layerIds;
	}
712295
private Collection<Displayable> getLayer(Integer layer)
    {
        final Collection<Displayable> displayables;
        if (!layers.containsKey(layer))
        {
            displayables = new HashSet<>();
            layers.put(layer, displayables);
        }
        else
        {
            displayables = layers.get(layer);
        }
        return displayables;
    }
1264386
@Pure
	public final boolean isTemporaryLayer() {
		MapLayer layer = this;
		GISLayerContainer<?> container;
		while (layer != null) {
			if (layer.isTemp) {
				return true;
			}
			container = layer.getContainer();
			layer = container instanceof MapLayer ? (MapLayer) container : null;
		}
		return false;
	}
1333110
public function generate($intBaseLayerId, $z, $x, $y)
    {
        if(\Session::getInstance()->get('baseLayerId'.$intBaseLayerId))
        {
            $baseLayer = \Session::getInstance()->get('baseLayerId'.$intBaseLayerId);
        }
        else{
            $baseLayer = C4gMapBaselayersModel::findById($intBaseLayerId);
            \Session::getInstance()->set('baseLayerId'.$intBaseLayerId,$baseLayer->row());
            $baseLayer = $baseLayer->row();
        }
        switch($baseLayer['provider'])
        {
            case "mapbox":
                if($baseLayer['api_key'] && $baseLayer['app_id'] && $baseLayer['mapbox_type'])
                {
                    if($baseLayer['mapbox_type'] === 'Mapbox')
                    {
                        $url = 'https://api.mapbox.com/styles/v1/' . $baseLayer['app_id'] . '/tiles/'.$z.'/'.$x.'/'.$y.'?access_token=' . $baseLayer['api_key'];
                    }
                    else
                    {
                        $url = "https://api.tiles.mapbox.com/v4/". $baseLayer['app_id'] . '/tiles/'.$z.'/'.$x.'/'.$y.'?access_token=' . $baseLayer['api_key'];
                    }
                }
                else{
                    return "wrong Mapbox configuration";
                }
                break;
//            case "bing":
//                if($baseLayer->apiKey && $baseLayer->style)
//                {
//
//                }
//                break;
            case "here":
                if($baseLayer['api_key'] && $baseLayer['app_id'] && $baseLayer['here_type']){
                    if ($baseLayer['here_type'] == 'normal') {
                        $url = 'https://{1-4}.base.maps.cit.api.here.com/maptile/2.1/maptile/newest/normal.day/'.$z.'/'.$x.'/'.$y.'/256/png' .
                            '?app_id='.$baseLayer['app_id'].'&app_code='.$baseLayer['api_key'];
                    }
                    if ($baseLayer['here_type'] == 'transit') {
                        $url = 'https://{1-4}.base.maps.cit.api.here.com/maptile/2.1/maptile/newest/normal.day.transit/'.$z.'/'.$x.'/'.$y.'/256/png' .
                            '?app_id='.$baseLayer['app_id'].'&app_code='.$baseLayer['api_key'];
                    }
                    if ($baseLayer['here_type'] == 'pedestrian') {
                        $url = 'https://{1-4}.base.maps.cit.api.here.com/maptile/2.1/maptile/newest/pedestrian.day/'.$z.'/'.$x.'/'.$y.'/256/png' .
                            '?app_id='.$baseLayer['app_id'].'&app_code='.$baseLayer['api_key'];
                    }
                    if ($baseLayer['here_type'] == 'terrain') {
                        $url = 'https://{1-4}.aerial.maps.cit.api.here.com/maptile/2.1/maptile/newest/terrain.day/'.$z.'/'.$x.'/'.$y.'/256/png' .
                            '?app_id='.$baseLayer['app_id'].'&app_code='.$baseLayer['api_key'];
                    }
                    if ($baseLayer['here_type'] == 'satellite') {
                        $url = 'https://{1-4}.aerial.maps.cit.api.here.com/maptile/2.1/maptile/newest/satellite.day/'.$z.'/'.$x.'/'.$y.'/256/png' .
                            '?app_id='.$baseLayer['app_id'].'&app_code='.$baseLayer['api_key'];
                    }
                    if ($baseLayer['here_type'] == 'hybrid') {
                        $url = 'https://{1-4}.aerial.maps.cit.api.here.com/maptile/2.1/maptile/newest/hybrid.day/'.$z.'/'.$x.'/'.$y.'/256/png' .
                            '?app_id='.$baseLayer['app_id'].'&app_code='.$baseLayer['api_key'];
                    }
                }
                break;
            case "thunder":
                if($baseLayer['api_key'] && $baseLayer['thunderforest_type']){
                    $url = 'https://tile.thunderforest.com/' . $baseLayer['thunderforest_type'] . '/'.$z.'/'.$x.'/'.$y.'.png?apikey=' . $baseLayer['api_key'];
                }
                else
                {
                    return "wrong Thunderforest configuration";
                }
                break;

        }
        $REQUEST = new \Request();
        if ($_SERVER['HTTP_REFERER']) {
            $REQUEST->setHeader('Referer', $_SERVER['HTTP_REFERER']);
        }
        if ($_SERVER['HTTP_USER_AGENT']) {
            $REQUEST->setHeader('User-Agent', $_SERVER['HTTP_USER_AGENT']);
        }
        if($url)
        {
            $REQUEST->send($url);
            return $REQUEST->response;
        }
        else{
            return "wrong baselayer configuration";
        }


    }
1237594
public INDArray params(boolean backwardOnly) {
        if (backwardOnly)
            return flattenedParams;

        List<INDArray> list = new ArrayList<>(layers.length);
        for (int i = 0; i < topologicalOrder.length; i++) {
            if (!vertices[topologicalOrder[i]].hasLayer())
                continue;

            Layer l = vertices[topologicalOrder[i]].getLayer();
            INDArray layerParams = l.params();
            if (layerParams != null)
                list.add(layerParams); //may be null: subsampling etc layers
        }

        return Nd4j.toFlattened('f', list);
    }
224817
def layers(self, annotationtype=None,set=None):
        """"""
        if inspect.isclass(annotationtype): annotationtype = annotationtype.ANNOTATIONTYPE
        return [ x for x in self.select(AbstractAnnotationLayer,set,False,True) if annotationtype is None or x.ANNOTATIONTYPE == annotationtype ]
347568
public function getNodeTypes($includeAbstractNodeTypes = true)
    {
        if ($this->cachedNodeTypes === []) {
            $this->loadNodeTypes();
        }
        if ($includeAbstractNodeTypes) {
            return $this->cachedNodeTypes;
        }

        $nonAbstractNodeTypes = array_filter($this->cachedNodeTypes, function ($nodeType) {
            return !$nodeType->isAbstract();
        });

        return $nonAbstractNodeTypes;
    }
8466
private function createLayer($nextLayer, $layer)
    {
        return function($object) use($nextLayer, $layer){
            return $layer->peel($object, $nextLayer);
        };
    }
655117
private MapCollections<K, V> getCollection() {
        @WeakOuter
        class InteropMapCollections extends MapCollections<K, V> {
            @Override
            protected int colGetSize() {
                return mSize;
            }

            @Override
            protected Object colGetEntry(int index, int offset) {
                return mArray[(index<<1) + offset];
            }

            @Override
            protected int colIndexOfKey(Object key) {
                return key == null ? indexOfNull() : indexOf(key, key.hashCode());
            }

            @Override
            protected int colIndexOfValue(Object value) {
                return indexOfValue(value);
            }

            @Override
            protected Map<K, V> colGetMap() {
                return ArrayMap.this;
            }

            @Override
            protected void colPut(K key, V value) {
                put(key, value);
            }

            @Override
            protected V colSetValue(int index, V value) {
                return setValueAt(index, value);
            }

            @Override
            protected void colRemoveAt(int index) {
                removeAt(index);
            }

            @Override
            protected void colClear() {
                clear();
            }
        }
        if (mCollections == null) {
            mCollections = new InteropMapCollections();
        }
        return mCollections;
    }
1092994
public function getMap($uid)
    {
        /** @var Map $map */
        $map = AssociativeArray::getFromKey($this->maps, $uid, new Map());

        if ($map->fileName && $map->lapRace === null) {
            $map = $this->factory->getConnection()->getMapInfo($map->fileName);
            $this->maps[$map->uId] = $map;
        }

        return $map;
    }
72197
public function getLine($coverageId, $networkId, $lineId, $depth = 0)
    {
        $query = array(
            'api' => 'coverage',
            'parameters' => array(
                'region' => $coverageId,
                'action' => 'lines',
                'path_filter' => 'networks/'.$networkId.'/lines/'.$lineId,
                'parameters' => '?depth='.$depth,
            ),
        );

        return $this->navitia_component->call($query);
    }
1185735
@Api
	public VectorLayer getVectorLayer(String layerId) {
		if (layers != null) {
			for (VectorLayer layer : getVectorLayers()) {
				if (layer.getId().equals(layerId)) {
					return layer;
				}
			}
		}
		return null;
	}
1311004
private function findSubclassMappings(IObjectMapper $mapper, NestedMember $member) : array
    {
        /** @var ObjectType $type */
        $type  = $member->getParts()[0]->getSourceType();
        $class = $type->getClass();

        $subclassMappings = [];

        $this->walkSubclassMappings($subclassMappings, $mapper->getMapping(), $class);

        return $subclassMappings;
    }