'-'); return $options; } /** * Overrides \Drupal\views\Plugin\views\row\Fields::buildOptionsForm(). */ public function buildOptionsForm(&$form, &$form_state) { parent::buildOptionsForm($form, $form_state); // Expand the description of the 'Inline field' checkboxes. $form['inline']['#description'] .= '
' . t("Note: In 'Entity Reference' displays, all fields will be displayed inline unless an explicit selection of inline fields is made here." ); } /** * {@inheritdoc} */ public function preRender($row) { // Force all fields to be inline by default. if (empty($this->options['inline'])) { $fields = $this->view->getItems('field', $this->displayHandler->display['id']); $this->options['inline'] = drupal_map_assoc(array_keys($fields)); } return parent::preRender($row); } }