src/Common/Model/BaseComponent.php
public function getBySlug($sSlug)
    {
        foreach ($this->aComponents as $oComponent) {
            if ($sSlug == $oComponent->slug) {
                return $oComponent;
            }
        }

        return null;
    }
public function getBySlug($sSlug)
    {
        foreach ($this->aComponents as $oComponent) {
            if ($sSlug == $oComponent->slug) {
                return $oComponent;
            }
        }

        return null;
    }
public function getBySlug ( $ sSlug ) { foreach ( $ this -> aComponents as $ oComponent ) { if ( $ sSlug == $ oComponent -> slug ) { return $ oComponent ; } } return null ; }
Get a component by it's slug

@param  string $sSlug The components's slug

@return \stdClass
Get a component by it s slug