Extending the class

If you want to use your own class for the Entity List field formatter, write a module with a class that extends EntityListFieldList...

class MyClass extends EntityListFieldList {}

...and configure your field instance so it uses your class. You’ll see the List class setting at the bottom of the settings form when you create an Entity List field.

Registering your class

For compatibility with entity_lister, you must also add your class to the allowed classes like so...

EntityLister::addAllowedClass('MyClass');

A good place to add that line of code is in your module's hook_enable implementation. You should call removeAllowedClass in your hook_disable to clean up the variable set in addAllowedClass. See the addAllowedClass and removeAllowedClass methods in the EntityLister class.