public function saveRedirect($slug, $postValues)
    {
        $redirectObject = RedirectsFactory::createRedirectFromPostValues($postValues);

        $redirects = $this->repository->redirects;
        foreach ($redirects as $key => $redirect) {
            if ($redirect->slug == $slug) {
                $redirects[$key] = $redirectObject;
            }
        }
        $this->repository->redirects = $redirects;
        $this->save();
    }
public function saveRedirect($slug, $postValues)
    {
        $redirectObject = RedirectsFactory::createRedirectFromPostValues($postValues);

        $redirects = $this->repository->redirects;
        foreach ($redirects as $key => $redirect) {
            if ($redirect->slug == $slug) {
                $redirects[$key] = $redirectObject;
            }
        }
        $this->repository->redirects = $redirects;
        $this->save();
    }
public function saveRedirect ( $ slug , $ postValues ) { $ redirectObject = RedirectsFactory :: createRedirectFromPostValues ( $ postValues ) ; $ redirects = $ this -> repository -> redirects ; foreach ( $ redirects as $ key => $ redirect ) { if ( $ redirect -> slug == $ slug ) { $ redirects [ $ key ] = $ redirectObject ; } } $ this -> repository -> redirects = $ redirects ; $ this -> save ( ) ; }
Save a redirect by it's slug
@param $slug
@param $postValues
Save a redirect by it s slug