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/public_html/core/model/modx/processors/element/tv/renders/mgr/input/ |
<?php /** * @var modX $this->modx * @var modTemplateVar $this * @var array $params * * @package modx * @subpackage processors.element.tv.renders.mgr.input */ class modTemplateVarInputRenderImage extends modTemplateVarInputRender { public function process($value,array $params = array()) { $this->modx->getService('fileHandler','modFileHandler', '', array('context' => $this->modx->context->get('key'))); /** @var modMediaSource $source */ $source = $this->tv->getSource($this->modx->resource->get('context_key')); if (!$source) return ''; if (!$source->getWorkingContext()) { return ''; } $source->setRequestProperties($_REQUEST); $source->initialize(); $this->modx->controller->setPlaceholder('source',$source->get('id')); $params = array_merge($source->getPropertyList(),$params); if (!$source->checkPolicy('view')) { $this->setPlaceholder('disabled',true); $this->tv->set('disabled',true); $this->tv->set('relativeValue',$this->tv->get('value')); } else { $this->setPlaceholder('disabled',false); $this->tv->set('disabled',false); $value = $this->tv->get('value'); if (!empty($value)) { $params['openTo'] = $source->getOpenTo($value,$params); } $this->tv->set('relativeValue',$value); } $this->setPlaceholder('params',$params); $this->setPlaceholder('tv',$this->tv); } public function getTemplate() { return 'element/tv/renders/input/image.tpl'; } } return 'modTemplateVarInputRenderImage';