Same filename in this branch
- 8.9.x core/lib/Drupal/Core/Entity/Plugin/DataType/EntityReference.php
- 8.9.x core/modules/entity_reference/src/Plugin/views/display/EntityReference.php
- 8.9.x core/modules/entity_reference/src/Plugin/views/row/EntityReference.php
- 8.9.x core/modules/entity_reference/src/Plugin/views/style/EntityReference.php
- 8.9.x core/modules/views/src/Plugin/views/display/EntityReference.php
- 8.9.x core/modules/views/src/Plugin/views/row/EntityReference.php
- 8.9.x core/modules/views/src/Plugin/views/style/EntityReference.php
- 8.9.x core/modules/field/src/Plugin/migrate/field/d7/EntityReference.php
- 8.9.x core/lib/Drupal/Core/Field/Plugin/migrate/field/d7/EntityReference.php
Same filename and directory in other branches
- 10 core/modules/views/src/Plugin/views/row/EntityReference.php
- 9 core/modules/views/src/Plugin/views/row/EntityReference.php
Namespace
Drupal\views\Plugin\views\row
File
core/modules/views/src/Plugin/views/row/EntityReference.php
View source
<?php
namespace Drupal\views\Plugin\views\row;
use Drupal\Core\Form\FormStateInterface;
class EntityReference extends Fields {
protected function defineOptions() {
$options = parent::defineOptions();
$options['separator'] = [
'default' => '-',
];
return $options;
}
public function buildOptionsForm(&$form, FormStateInterface $form_state) {
parent::buildOptionsForm($form, $form_state);
$form['inline']['#description'] .= '<br />' . $this
->t("<strong>Note:</strong> In 'Entity Reference' displays, all fields will be displayed inline unless an explicit selection of inline fields is made here.");
}
public function preRender($row) {
if (empty($this->options['inline'])) {
$fields = $this->view
->getHandlers('field', $this->displayHandler->display['id']);
$names = array_keys($fields);
$this->options['inline'] = array_combine($names, $names);
}
return parent::preRender($row);
}
}
Classes