__('Page List Select', __FILE__), // Module Title 'summary' => __('Selection of a single page from a ProcessWire page tree list', __FILE__), // Module Summary 'version' => 100, 'permanent' => true, ); } public function init() { $this->fuel('modules')->get('ProcessPageList'); // prerequisite module $this->set('parent_id', 0); $this->set('labelFieldName', 'title'); $this->set('startLabel', $this->_('Change')); $this->set('cancelLabel', $this->_('Cancel')); $this->set('selectLabel', $this->_('Select')); $this->set('unselectLabel', $this->_('Unselect')); $this->set('moreLabel', $this->_('More')); $this->set('showPath', true); parent::init(); } public function ___render() { if(!strlen($this->parent_id)) { return "
" . $this->_('Unable to render this field due to missing parent page in field settings.') . "
"; } $out = "\ngetAttributesString() . " />" . "\n"; return $out; } public function ___processInput(WireInputData $input) { parent::___processInput($input); $this->value = (int) $this->value; return $this; } }