/**
  * Replaces an existing object with the same identifier by the given object
  *
  * @param object $modifiedObject The modified object
  * @throws Exception\UnknownObjectException
  * @throws Exception\IllegalObjectTypeException
  * @return void
  */
 public function update($modifiedObject)
 {
     if (!$modifiedObject instanceof $this->objectType) {
         throw new \TYPO3\CMS\Extbase\Persistence\Exception\IllegalObjectTypeException('The modified object given to update() was not of the type (' . $this->objectType . ') this repository manages.', 1249479625);
     }
     $this->dataHandler->stripslashes_values = 0;
     $this->dataHandler->start($modifiedObject->toDataArray(), []);
     $this->dataHandler->process_datamap();
 }
Пример #2
0
 /**
  * activate a theme.
  *
  * @param string $theme
  *
  * @return void
  */
 public function setThemeAction($theme = null)
 {
     $sysTemplateRecordUid = CheckPageUtility::getThemeableSysTemplateRecord($this->id);
     if ($sysTemplateRecordUid !== false && $theme !== null) {
         $record = ['sys_template' => [$sysTemplateRecordUid => ['tx_themes_skin' => $theme]]];
         $tce = new \TYPO3\CMS\Core\DataHandling\DataHandler();
         $tce->stripslashes_values = 0;
         $user = clone $this->getBackendUser();
         $user->user['admin'] = 1;
         $tce->start($record, [], $user);
         $tce->process_datamap();
         $tce->clear_cacheCmd('pages');
     } else {
         $this->flashMessageContainer->add('Problem selecting theme');
     }
     $this->redirect('index');
 }
Пример #3
0
 /**
  * activate a theme
  *
  * @param string $theme
  * @return void
  */
 public function setThemeAction($theme = NULL)
 {
     $sysTemplateRecordUid = CheckPageUtility::getThemeableSysTemplateRecord($this->id);
     if ($sysTemplateRecordUid !== FALSE && $theme !== NULL) {
         $record = array('sys_template' => array($sysTemplateRecordUid => array('tx_themes_skin' => $theme)));
         $tce = new \TYPO3\CMS\Core\DataHandling\DataHandler();
         $tce->stripslashes_values = 0;
         $user = clone $GLOBALS['BE_USER'];
         $user->user['admin'] = 1;
         $tce->start($record, array(), $user);
         $tce->process_datamap();
         $tce->clear_cacheCmd('pages');
     } else {
         $this->flashMessageContainer->add('Problem selecting theme');
     }
     $this->redirect('index');
 }