public function process($value, array $params = array()) { $tv = $this->modx->controller->getPlaceholder('tv'); $tv->value = $this->modx->resource->get($tv->name); $this->setPlaceholder('tv', $tv); return parent::process($value, $params); }
public function __construct(modTemplateVar $tv, array $config = array()) { parent::__construct($tv, $config); $defaultSmartTagCorePath = $this->modx->getOption('core_path') . 'components/smarttag/'; $smarttagCorePath = $this->modx->getOption('smarttag.core_path', null, $defaultSmartTagCorePath); $smarttag = $this->modx->getService('smarttag', 'SmartTag', $smarttagCorePath . 'model/'); if (!$smarttag instanceof SmartTag) { return; } $version = str_replace(' ', '', $smarttag->config['version']); $isJsCompressed = $this->modx->getOption('compress_js'); $withVersion = $isJsCompressed ? '' : '?v=' . $version; $assetsUrl = $this->modx->getOption('assets_url', null, MODX_ASSETS_URL) . 'components/smarttag/'; $this->modx->controller->addJavascript($assetsUrl . 'js/mgr/smarttag.js' . $withVersion); $connectorUrl = $assetsUrl . 'conn/mgr.php'; $this->modx->controller->addHTML(' <script type="text/javascript"> // <![CDATA[ SmartTag.config.connectorUrl = "' . $connectorUrl . '"; // ]]> </script>'); }
public function getLexiconTopics() { return array_merge(parent::getLexiconTopics(), array('maplocationtv:tv_widget')); }