You are here

public function MediaWatermarkForm::exist in Media watermark 8

Check if Media Watermark exists.

Parameters

int $media_watermark_id: Media Watermark identifier.

Return value

bool TRUE if Media Watermark exists.

1 call to MediaWatermarkForm::exist()
MediaWatermarkForm::save in src/Form/MediaWatermarkForm.php
Form submission handler for the 'save' action.

File

src/Form/MediaWatermarkForm.php, line 207

Class

MediaWatermarkForm
Class MediaWatermarkForm.

Namespace

Drupal\media_watermark\Form

Code

public function exist($media_watermark_id) {
  $entity = $this->entityQuery
    ->get('media_watermark')
    ->condition('id', $media_watermark_id)
    ->execute();
  return (bool) $entity;
}