NoDisplay.php in Entity Browser 8
File
src/Plugin/EntityBrowser/SelectionDisplay/NoDisplay.php
View source
<?php
namespace Drupal\entity_browser\Plugin\EntityBrowser\SelectionDisplay;
use Drupal\Core\Form\FormStateInterface;
use Drupal\entity_browser\SelectionDisplayBase;
class NoDisplay extends SelectionDisplayBase {
public function getForm(array &$original_form, FormStateInterface $form_state) {
return [];
}
public function submit(array &$form, FormStateInterface $form_state) {
if (!empty($form_state
->getTriggeringElement()['#eb_widget_main_submit'])) {
$this
->selectionDone($form_state);
}
}
}
Classes
Name |
Description |
NoDisplay |
Does not show current selection and immediately delivers selected entities. |