FieldWidgetDisplayBase.php in Entity Browser 8.2
File
src/FieldWidgetDisplayBase.php
View source
<?php
namespace Drupal\entity_browser;
use Drupal\Core\Entity\EntityTypeInterface;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Plugin\PluginBase;
abstract class FieldWidgetDisplayBase extends PluginBase implements FieldWidgetDisplayInterface {
public function __construct(array $configuration, $plugin_id, $plugin_definition) {
parent::__construct($configuration, $plugin_id, $plugin_definition);
$this
->setConfiguration($configuration);
}
public function settingsForm(array $form, FormStateInterface $form_state) {
return [];
}
public function isApplicable(EntityTypeInterface $entity_type) {
return TRUE;
}
public function getConfiguration() {
return $this->configuration;
}
public function setConfiguration(array $configuration) {
$configuration += $this
->defaultConfiguration();
$this->configuration = $configuration;
}
public function calculateDependencies() {
return [];
}
public function defaultConfiguration() {
return [];
}
}