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/packages/ |
<?php /** * View a package * * @deprecated Is this even used anymore? * * @param string $id The signature of the package. * * @package modx * @subpackage processors.workspace.packages */ class modPackageViewProcessor extends modProcessor { /** @var modTransportPackage $package */ public $package; public function checkPermissions() { return $this->modx->hasPermission('packages'); } public function getLanguageTopics() { return array('workspace'); } public function initialize() { $signature = $this->getProperty('id'); if (empty($signature)) return $this->modx->lexicon('package_err_ns'); $this->package = $this->modx->getObject('transport.modTransportPackage',$signature); if (empty($this->package)) return $this->modx->lexicon('package_err_nf'); return true; } public function process() { $collection= array(); $packageArray = $this->package->toArray(); $installed = $this->package->get('installed'); $packageArray['installed'] = $installed == null ? $this->modx->lexicon('no') : $installed; $collection[]= $packageArray; return $this->success('', $collection); } } return 'modPackageViewProcessor';