You are here

public function Flag::setGlobal in Flag 8.4

Sets the flag as global or not.

Parameters

bool $global: TRUE to mark the flag as global, FALSE for the default behavior.

Overrides FlagInterface::setGlobal

See also

\Drupal\flag\Entity\Flag::isGlobal()

File

src/Entity/Flag.php, line 356

Class

Flag
Provides the Flag configuration entity.

Namespace

Drupal\flag\Entity

Code

public function setGlobal($global = TRUE) {
  if ($global) {
    $this->global = TRUE;
  }
  else {
    $this->global = FALSE;
  }
}