コード例 #1
0
 /**
  * Save stop words and keywords
  *
  * @param string $pageHash
  * @param int $pageId
  * @param array $stopwords
  * @param array $keywords
  * @return void
  */
 public function saveStopwordsKeywordsAction($pageHash, $pageId, $stopwords = [], $keywords = [])
 {
     if ($this->getBackendUserAuthentication()->isAdmin()) {
         if (is_array($stopwords) && !empty($stopwords)) {
             $this->administrationRepository->saveStopWords($stopwords);
         }
         if (is_array($keywords) && !empty($keywords)) {
             $this->administrationRepository->saveKeywords($keywords, $pageId);
         }
     }
     $this->redirect('statisticDetails', null, null, ['pageHash' => $pageHash]);
 }