public function JobItem::cloneAsActive in Translation Management Tool 8
File
- src/
Entity/ JobItem.php, line 161
Class
- JobItem
- Entity class for the tmgmt_job_item entity.
Namespace
Drupal\tmgmt\EntityCode
public function cloneAsActive() {
$clone = $this
->createDuplicate();
$clone->data->value = NULL;
$clone->unserializedData = NULL;
$clone->tjid->target_id = 0;
$clone->tjiid->value = 0;
$clone->word_count->value = NULL;
$clone->tags_count->value = NULL;
$clone->count_accepted->value = NULL;
$clone->count_pending->value = NULL;
$clone->count_translated->value = NULL;
$clone->count_reviewed->value = NULL;
$clone->state->value = static::STATE_ACTIVE;
return $clone;
}