Skip to content
Snippets Groups Projects
Commit c8d99ef5 authored by Viktor Holovachek's avatar Viktor Holovachek
Browse files

Resolve #3411028 "Admin page"

parent 40dcbb33
No related branches found
No related tags found
1 merge request!17Resolve #3411028 "Admin page"
......@@ -3,40 +3,12 @@
namespace Drupal\field_extra\Controller;
use Drupal\Core\Controller\ControllerBase;
use Drupal\Core\Entity\EntityTypeManagerInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
/**
* Returns a table with all private fields.
*/
class FieldExtraController extends ControllerBase {
/**
* Returns the entity_type.manager service.
*
* @var \Drupal\Core\Entity\EntityTypeManagerInterface
*/
protected $entityTypeManager;
/**
* Construct FieldExtraController object.
*
* @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager
* Provides an interface for entity type managers.
*/
public function __construct(EntityTypeManagerInterface $entity_type_manager) {
$this->entityTypeManager = $entity_type_manager;
}
/**
* {@inheritdoc}
*/
public static function create(ContainerInterface $container) {
return new static(
$container->get('entity_type.manager')
);
}
/**
* Show all private fields.
*/
......@@ -49,7 +21,7 @@ class FieldExtraController extends ControllerBase {
];
$rows = [];
$field_configs = $this->entityTypeManager->getStorage('field_config')->loadMultiple();
$field_configs = $this->entityTypeManager()->getStorage('field_config')->loadMultiple();
$config = $this->config('field_extra.private_fields');
/** @var \Drupal\field\Entity\FieldConfig $field_config */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment