public function saveValuelist($slug, $postValues)
    {
        $valuelistObject = ValuelistFactory::createValuelistFromPostValues($postValues);

        $valuelists = $this->repository->valuelists;
        foreach ($valuelists as $key => $valuelist) {
            if ($valuelist->slug == $slug) {
                $valuelists[$key] = $valuelistObject;
            }
        }
        $this->repository->valuelists = $valuelists;
        $this->save();
    }
public function saveValuelist($slug, $postValues)
    {
        $valuelistObject = ValuelistFactory::createValuelistFromPostValues($postValues);

        $valuelists = $this->repository->valuelists;
        foreach ($valuelists as $key => $valuelist) {
            if ($valuelist->slug == $slug) {
                $valuelists[$key] = $valuelistObject;
            }
        }
        $this->repository->valuelists = $valuelists;
        $this->save();
    }
public function saveValuelist ( $ slug , $ postValues ) { $ valuelistObject = ValuelistFactory :: createValuelistFromPostValues ( $ postValues ) ; $ valuelists = $ this -> repository -> valuelists ; foreach ( $ valuelists as $ key => $ valuelist ) { if ( $ valuelist -> slug == $ slug ) { $ valuelists [ $ key ] = $ valuelistObject ; } } $ this -> repository -> valuelists = $ valuelists ; $ this -> save ( ) ; }
Save changes to a valuelist

@param $slug
@param $postValues

@throws \Exception
Save changes to a valuelist