Jump to content

Module Config Inputfields not displayed with namespace ProcessWire


markus_blue_tomato
 Share

Recommended Posts

Hello!

I have a problem with the display of getModuleConfigInputfields. With this code, the Inputfields are not shown.

When I remove "namespace ProcessWire" it works, but then the first request needs 1.5 minutes for the compilation.

Does anybody knows what the .... is going on here? I am getting a little bit crazy 😉

<?php

namespace ProcessWire;

class ElasticsearchFeeder extends WireData implements Module, ConfigurableModule
{

	public static function getModuleInfo()
	{
		return array(
			'title' => 'ElasticsearchFeeder',
			'class' => 'ElasticsearchFeeder',
			'version' => 134,
			'summary' => 'Schema-flexible module for getting your page into ElasticSearch',
			'href' => 'https://github.com/blue-tomato/ElasticsearchFeeder/',
			'singular' => true,
			'autoload' => 'template=admin',
			'requires' => [
				'PHP>=7.0.0',
				'ProcessWire>=3.0.133'
			]
		);
	}

	public function init()
	{
	}


	public static function getModuleConfigInputfields(array $data)
	{
		$inputfields = new InputfieldWrapper();

		$field = wire('modules')->get('InputfieldText');
		$field->name = 'headline_default';
		$field->label = "Please enter the promo headline:";
		$inputfields->add($field);

		return $inputfields;
	}
}

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...