Exemple #1
0
 /**
  * {@inheritdoc}
  */
 public function __construct(array $values, $entity_type)
 {
     $this->pluginManager = \Drupal::service('plugin.manager.field.widget');
     parent::__construct($values, $entity_type);
 }
 /**
  * {@inheritdoc}
  */
 public function postSave(EntityStorageInterface $storage, $update = TRUE)
 {
     // Reset the render cache for the target entity type.
     parent::postSave($storage, $update);
     if (\Drupal::entityManager()->hasHandler($this->targetEntityType, 'view_builder')) {
         \Drupal::entityManager()->getViewBuilder($this->targetEntityType)->resetCache();
     }
 }