You are here

public function EntityFlagType::isAddEditForm in Flag 8.4

Determines if the given form operation is add or edit.

Parameters

string $operation: The form operation.

Return value

bool Returns TRUE if the operation is an add edit operation.

1 method overrides EntityFlagType::isAddEditForm()
UserFlagType::isAddEditForm in src/Plugin/Flag/UserFlagType.php
Determines if the given form operation is add or edit.

File

src/Plugin/Flag/EntityFlagType.php, line 235

Class

EntityFlagType
Provides a flag type for all entity types.

Namespace

Drupal\flag\Plugin\Flag

Code

public function isAddEditForm($operation) {
  return in_array($operation, [
    'default',
    'edit',
  ]);
}