FormEnhancerBase.php in Flexiform 8
File
src/FormEnhancer/FormEnhancerBase.php
View source
<?php
namespace Drupal\flexiform\FormEnhancer;
use Drupal\Core\Plugin\PluginBase;
use Drupal\flexiform\FlexiformEntityFormDisplayInterface;
class FormEnhancerBase extends PluginBase implements FormEnhancerInterface {
protected $formDisplay;
protected $supportedEvents = [];
public function setFormDisplay(FlexiformEntityFormDisplayInterface $form_display) {
$this->formDisplay = $form_display;
return $this;
}
protected function getFormDisplay() {
return $this->formDisplay;
}
public function applies($event) {
return in_array($event, $this->supportedEvents);
}
}