src/Components.php
public static function getBySlug($sSlug): ?Component
    {
        $aComponents = static::available();

        foreach ($aComponents as $oComponent) {
            if ($oComponent->slug === $sSlug) {
                return $oComponent;
            }
        }

        return null;
    }
public static function getBySlug($sSlug): ?Component
    {
        $aComponents = static::available();

        foreach ($aComponents as $oComponent) {
            if ($oComponent->slug === $sSlug) {
                return $oComponent;
            }
        }

        return null;
    }
public static function getBySlug ( $ sSlug ) : ? Component { $ aComponents = static :: available ( ) ; foreach ( $ aComponents as $ oComponent ) { if ( $ oComponent -> slug === $ sSlug ) { return $ oComponent ; } } return null ; }
Returns a component by its slug

@param string $sSlug The component's slug

@return Component
Returns a component by its slug