app/Services/ModuleService.php
public function findByInterface(string $interface, $include_disabled = false, $sort = false): Collection
    {
        $modules = $this->all($include_disabled)
            ->filter($this->interfaceFilter($interface));

        switch ($interface) {
            case ModuleFooterInterface::class:
                return $modules->sort($this->footerSorter());

            case ModuleMenuInterface::class:
                return $modules->sort($this->menuSorter());

            case ModuleSidebarInterface::class:
                return $modules->sort($this->sidebarSorter());

            case ModuleTabInterface::class:
                return $modules->sort($this->tabSorter());

            default:
                if ($sort) {
                    return $modules->sort($this->moduleSorter());
                }

                return $modules;
        }
    }
public function findByInterface(string $interface, $include_disabled = false, $sort = false): Collection
    {
        $modules = $this->all($include_disabled)
            ->filter($this->interfaceFilter($interface));

        switch ($interface) {
            case ModuleFooterInterface::class:
                return $modules->sort($this->footerSorter());

            case ModuleMenuInterface::class:
                return $modules->sort($this->menuSorter());

            case ModuleSidebarInterface::class:
                return $modules->sort($this->sidebarSorter());

            case ModuleTabInterface::class:
                return $modules->sort($this->tabSorter());

            default:
                if ($sort) {
                    return $modules->sort($this->moduleSorter());
                }

                return $modules;
        }
    }
public function findByInterface ( string $ interface , $ include_disabled = false , $ sort = false ) : Collection { $ modules = $ this -> all ( $ include_disabled ) -> filter ( $ this -> interfaceFilter ( $ interface ) ) ; switch ( $ interface ) { case ModuleFooterInterface :: class : return $ modules -> sort ( $ this -> footerSorter ( ) ) ; case ModuleMenuInterface :: class : return $ modules -> sort ( $ this -> menuSorter ( ) ) ; case ModuleSidebarInterface :: class : return $ modules -> sort ( $ this -> sidebarSorter ( ) ) ; case ModuleTabInterface :: class : return $ modules -> sort ( $ this -> tabSorter ( ) ) ; default : if ( $ sort ) { return $ modules -> sort ( $ this -> moduleSorter ( ) ) ; } return $ modules ; } }
All modules which provide a specific function.

@param string $interface
@param bool   $include_disabled
@param bool   $sort

@return Collection
@return ModuleInterface[]
All modules which provide a specific function .