public function getByType($type, $enabled = false)
    {
        $modules = $enabled ? $this->getEnabled() : $this->getList();

        foreach ($modules as $id => $info) {
            if ($type !== $info['type']) {
                unset($modules[$id]);
            }
        }

        return $modules;
    }
public function getByType($type, $enabled = false)
    {
        $modules = $enabled ? $this->getEnabled() : $this->getList();

        foreach ($modules as $id => $info) {
            if ($type !== $info['type']) {
                unset($modules[$id]);
            }
        }

        return $modules;
    }
public function getByType ( $ type , $ enabled = false ) { $ modules = $ enabled ? $ this -> getEnabled ( ) : $ this -> getList ( ) ; foreach ( $ modules as $ id => $ info ) { if ( $ type !== $ info [ 'type' ] ) { unset ( $ modules [ $ id ] ) ; } } return $ modules ; }
Returns an array of modules by the type
@param string $type
@param boolean $enabled
@return array
Returns an array of modules by the type