You are here

public function FlagMapping::setFlag in Flags 8

Sets target flag.

Parameters

string $flag:

Return value

FlagMapping

File

src/Entity/FlagMapping.php, line 120

Class

FlagMapping
Defines the flag mapping entity.

Namespace

Drupal\flags\Entity

Code

public function setFlag($flag) {

  // Make sure that the flag is lowercase.
  $this->flag = strtolower($flag);
  return $this;
}