public function LocalTask::isAuthor in Translation Management Tool 8
Checks whether the user described by $account is the author of this task.
Parameters
\Drupal\Core\Session\AccountInterface $account: (Optional) A user object. Defaults to the currently logged in user.
Overrides LocalTaskInterface::isAuthor
File
- translators/
tmgmt_local/ src/ Entity/ LocalTask.php, line 278
Class
- LocalTask
- Entity class for the local task entity.
Namespace
Drupal\tmgmt_local\EntityCode
public function isAuthor(AccountInterface $account = NULL) {
$account = isset($account) ? $account : \Drupal::currentUser();
return $this
->getOwnerId() == $account
->id();
}