code: public function edit($pageName, array $values)
      {
          $language = $values["language"];
          unset($values["language"]);
          $pageDir = $this->pagesDir . '/' . $pageName . '/' . $language;
          $seoFile = $pageDir . '/seo.json';
          if (null !== $this->username){
              $seoFile = $pageDir . '/' . $this->username . '.json';
          }
          $currentPage = json_decode(FilesystemTools::readFile($seoFile), true);
  
          $values = $this->slugifyPermalink($values);
          $this->dispatchPermalinkChanged($currentPage, $values);
  
          $encodedPage = json_encode($values);
          $event = Dispatcher::dispatch(PageEvents::PAGE_EDITING, new PageEditingEvent($seoFile, $encodedPage));
          $encodedPage = $event->getFileContent();
          FilesystemTools::writeFile($seoFile, $encodedPage);
  
          Dispatcher::dispatch(PageEvents::PAGE_EDITED, new PageEditedEvent($seoFile, $encodedPage));
          DataLogger::log(
              sprintf('Page SEO attributes "%s" for language "%s" were edited', $pageName, $language)
          );
  
          return $encodedPage;
      }
docs: Edits the seo attributes for the given page
  @param string $pageName
  @param array $values
  
  @return string The json seo content