Commit 99d4520c authored by Pracheth S P's avatar Pracheth S P Committed by Vadym Abramchuk
Browse files

Issue #3319925 by komalparmar, Pracheth, abramm: Replace README.txt with README.md

parent 5a339638
Loading
Loading
Loading
Loading
+9 −9
Original line number Diff line number Diff line
-- SUMMARY --
##  SUMMARY 

The Extrafield Views Integration Module enables all Drupal core extra fields in
the system from type "display" as fields in views.

-- REQUIREMENTS --
## REQUIREMENTS 

Views
Entity

 -- INSTALLATION --
## INSTALLATION 

For installing the module, just download the source code and enable the module.
That's all.

-- CONFIGURATION --
## CONFIGURATION 

The module itself needs no configuration, because the extra fields that you
want to use need an render_class key and a class implements ExtrafieldRenderClassInterface.
Every module can use hook_entity_extra_field_info to register the extra fields. Normally it looks like
this:

```
function hook_entity_extra_field_info() {
  $extra_fields = [
    'entity_type' => [
@@ -39,9 +39,9 @@ function hook_entity_extra_field_info() {

return $extra_fields;
}

```
The class simply look like this:

```
<?php

namespace Drupal\your_module;
@@ -60,13 +60,13 @@ class YourClass implements ExtrafieldRenderClassInterface {
    return "String";
  }
}

```
The module needs both, the render_class key and the existing class defined
in the render_class key. The module only registers extra fields from type
"display" with the required key and the existing class. Views then
passes the entity to the static render function of the field.

-- FAQ --
## FAQ 

Q:  I register an extra field for node type "article". But views doesn't show
    me the extra field.