Skip to content
Snippets Groups Projects
Commit a2c775a6 authored by Erik Stielstra's avatar Erik Stielstra
Browse files

Issue #3337561 by Sutharsan: Fix code style issues

parent 10a11a77
No related branches found
Tags 8.x-2.0-beta1
No related merge requests found
......@@ -10,7 +10,7 @@ use Drupal\Core\Entity\EntityTypeManagerInterface;
use Drupal\Core\Language\LanguageManagerInterface;
/**
* Class BlockEntityStorage.
* The entity storage for FieldBlocks.
*
* @package Drupal\fieldblock
*/
......
......@@ -7,7 +7,7 @@ use Drupal\Core\Entity\ContentEntityTypeInterface;
use Drupal\Core\Entity\EntityTypeInterface;
/**
* Class FieldBlockController.
* The FieldBlock controller.
*
* @package Drupal\fieldblock\Controller
*/
......
......@@ -135,8 +135,8 @@ class FieldBlockConfigForm extends ConfigFormBase {
$form['cleanup'] = [
'#type' => 'checkboxes',
'#required' => FALSE,
'#title' => t('Clean up remaining field blocks of removed entity types'),
'#description' => t('These entity types no longer exist, but one or more of their field blocks still do. Select the entity type(s) of which the field block(s) must be removed.'),
'#title' => $this->t('Clean up remaining field blocks of removed entity types'),
'#description' => $this->t('These entity types no longer exist, but one or more of their field blocks still do. Select the entity type(s) of which the field block(s) must be removed.'),
'#default_value' => [],
'#options' => $cleanup_options,
];
......
......@@ -62,7 +62,7 @@ class FieldBlock extends BlockBase implements ContainerFactoryPluginInterface {
protected $routeMatch;
/**
* The language manager
* The language manager.
*
* @var \Drupal\Core\Language\LanguageManagerInterface
*/
......@@ -92,6 +92,8 @@ class FieldBlock extends BlockBase implements ContainerFactoryPluginInterface {
* The field formatter plugin manager.
* @param \Drupal\Core\Routing\RouteMatchInterface $route_match
* The current route match.
* @param \Drupal\Core\Language\LanguageManagerInterface $languageManager
* The language manager.
*/
public function __construct(array $configuration, $plugin_id, $plugin_definition, EntityTypeManagerInterface $entityTypeManager, EntityFieldManagerInterface $entityFieldManager, FormatterPluginManager $formatter_plugin_manager, RouteMatchInterface $route_match, LanguageManagerInterface $languageManager) {
parent::__construct($configuration, $plugin_id, $plugin_definition);
......@@ -395,11 +397,13 @@ class FieldBlock extends BlockBase implements ContainerFactoryPluginInterface {
}
/**
* Ensure that the field gets correctly translated into the current language
* Ensure that the field gets correctly translated into the current language.
*
* @param \Drupal\Core\Entity\ContentEntityInterface $entity
* The entity that contains the field.
*
* @return \Drupal\Core\Field\FieldItemListInterface
* The field in the current language.
*/
private function getTranslatedFieldFromEntity(ContentEntityInterface $entity) {
$language = $this->languageManager->getCurrentLanguage()->getId();
......
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