Server : Apache System : Linux indy02.toastserver.com 3.10.0-962.3.2.lve1.5.85.el7.x86_64 #1 SMP Thu Apr 18 15:18:36 UTC 2024 x86_64 User : palandch ( 1163) PHP Version : 7.1.33 Disable Function : NONE Directory : /home/palandch/www/core/model/modx/processors/workspace/lexicon/ |
<?php /** * Updates a lexicon entry from a grid * * @package modx * @subpackage processors.workspace.lexicon */ class modLexiconEntryRevertProcessor extends modProcessor { /** @var modLexiconEntry $entry */ public $entry; public function checkPermissions() { return $this->modx->hasPermission('lexicons'); } public function getLanguageTopics() { return array('lexicon'); } public function process() { $language = $this->getProperty('language','en'); $namespace = $this->getProperty('namespace','core'); $topic = $this->getProperty('topic','default'); $this->modx->lexicon->getFileTopic($language,$namespace,$topic); /* @var modLexiconEntry $entry */ $this->entry = $this->modx->getObject('modLexiconEntry',array( 'name' => $this->getProperty('name'), 'namespace' => $namespace, 'language' => $language, 'topic' => $topic, )); if ($this->entry) { $this->entry->remove(); $this->entry->clearCache(); } $this->logManagerAction(); return $this->success(); } public function logManagerAction() { $this->modx->logManagerAction('lexicon_entry_update','modLexiconEntry',$this->entry->get('id')); } } return 'modLexiconEntryRevertProcessor';