src/storage/storage/BricksStorage.php
public function getBrickBySlug($slug)
    {
        $bricks = $this->repository->bricks;
        foreach ($bricks as $brick) {
            if ($brick->slug == $slug) {
                return $brick;
            }
        }

        return null;
    }
public function getBrickBySlug($slug)
    {
        $bricks = $this->repository->bricks;
        foreach ($bricks as $brick) {
            if ($brick->slug == $slug) {
                return $brick;
            }
        }

        return null;
    }
public function getBrickBySlug ( $ slug ) { $ bricks = $ this -> repository -> bricks ; foreach ( $ bricks as $ brick ) { if ( $ brick -> slug == $ slug ) { return $ brick ; } } return null ; }
Get a brick by its slug

@param $slug

@return \stdClass
Get a brick by its slug