public function getResourceSettings() { $fields = array('richtext' => array('type' => 'flipswitch', 'value' => $this->hm->modx->getOption('richtext_default')), 'isfolder' => array('type' => 'flipswitch', 'value' => false, 'title' => $this->modx->lexicon('resource_folder')), 'pub_date' => array('type' => 'text', 'title' => $this->modx->lexicon('resource_publishdate')), 'unpub_date' => array('type' => 'text', 'title' => $this->modx->lexicon('resource_unpublishdate')), 'searchable' => array('type' => 'boolean', 'value' => $this->hm->modx->getOption('search_default')), 'cacheable' => array('type' => 'boolean', 'value' => $this->hm->modx->getOption('cache_default')), 'deleted' => array('type' => 'boolean', 'value' => false)); $list = array(); foreach ($fields as $name => $details) { $details['title'] = $details['title'] ? $details['title'] : ($this->modx->lexicon->exists($name) ? $this->modx->lexicon($name) : $this->modx->lexicon('resource_' . $name)); $details['name'] = $name; $list[$name] = $this->renderer->render($details['type'], $details); } $this->setPlaceholder('settings', implode("\n", $list)); }
/** * Prepare richtext (inherits) * @param $field * @return hmInputRenderer.prepareRichtext */ public function prepareRichtext($field) { return parent::prepareRichtext($field); }