public function Flag::getShortText in Flag 8.4
Gets the flag short text.
Parameters
string $action: The flag action, either 'flag' or 'unflag'.
Return value
string A string containing the flag short text.
Overrides FlagInterface::getShortText
File
- src/
Entity/ Flag.php, line 375
Class
- Flag
- Provides the Flag configuration entity.
Namespace
Drupal\flag\EntityCode
public function getShortText($action) {
return $action === 'unflag' ? $this->unflag_short : $this->flag_short;
}