You are here

public function LocalTask::assign in Translation Management Tool 8

Assign translation task to passed user.

Parameters

\Drupal\Core\Session\AccountInterface $user: User object.

Overrides LocalTaskInterface::assign

File

translators/tmgmt_local/src/Entity/LocalTask.php, line 192

Class

LocalTask
Entity class for the local task entity.

Namespace

Drupal\tmgmt_local\Entity

Code

public function assign(AccountInterface $user) {
  $this
    ->incrementLoopCount(static::STATUS_PENDING, $user
    ->id());
  $this
    ->set('tuid', $user
    ->id());
  $this
    ->set('status', static::STATUS_PENDING);
}