concrete/src/Search/Index/DefaultManager.php
public function getIndexes($type, $includeGlobal=true)
    {
        // Yield all indexes registered against this type
        if (isset($this->indexes[$type])) {
            foreach ($this->indexes[$type] as $index) {
                yield $type => $this->inflateIndex($index);
            }
        }

        $all = self::TYPE_ALL;
        if ($type !== $all && $includeGlobal) {
            // Yield all indexes registered against ALL types
            if (isset($this->indexes[$all])) {
                foreach ($this->indexes[$all] as $key => $index) {
                    yield $all => $this->inflateIndex($index);
                }
            }
        }
    }
public function getIndexes($type, $includeGlobal=true)
    {
        // Yield all indexes registered against this type
        if (isset($this->indexes[$type])) {
            foreach ($this->indexes[$type] as $index) {
                yield $type => $this->inflateIndex($index);
            }
        }

        $all = self::TYPE_ALL;
        if ($type !== $all && $includeGlobal) {
            // Yield all indexes registered against ALL types
            if (isset($this->indexes[$all])) {
                foreach ($this->indexes[$all] as $key => $index) {
                    yield $all => $this->inflateIndex($index);
                }
            }
        }
    }
public function getIndexes ( $ type , $ includeGlobal = true ) { // Yield all indexes registered against this type if ( isset ( $ this -> indexes [ $ type ] ) ) { foreach ( $ this -> indexes [ $ type ] as $ index ) { yield $ type => $ this -> inflateIndex ( $ index ) ; } } $ all = self :: TYPE_ALL ; if ( $ type !== $ all && $ includeGlobal ) { // Yield all indexes registered against ALL types if ( isset ( $ this -> indexes [ $ all ] ) ) { foreach ( $ this -> indexes [ $ all ] as $ key => $ index ) { yield $ all => $ this -> inflateIndex ( $ index ) ; } } } }
Get the indexes for a type
@param string $type
@param bool $includeGlobal
@return \Concrete\Core\Search\Index\IndexInterface[]|\Concrete\Core\Search\Index\Iterator
Get the indexes for a type