You are here

public function Webform::getCacheTags in Webform 6.x

Same name and namespace in other branches
  1. 8.5 src/Entity/Webform.php \Drupal\webform\Entity\Webform::getCacheTags()

The cache tags associated with this object.

When this object is modified, these cache tags will be invalidated.

Return value

string[] A set of cache tags.

Overrides EntityBase::getCacheTags

File

src/Entity/Webform.php, line 2237

Class

Webform
Defines the webform entity.

Namespace

Drupal\webform\Entity

Code

public function getCacheTags() {
  $cache_tags = parent::getCacheTags();

  // Add webform to cache tags which are used by the WebformSubmissionForm.
  $cache_tags[] = 'webform:' . $this
    ->id();

  // Add webform settings to cache tags which are used to define
  // default settings.
  $cache_tags[] = 'config:webform.settings';
  return $cache_tags;
}