/** * @param StatusInterface $status */ public function __construct(StatusInterface $status) { parent::__construct(); $this->id = $status->getId(); $this->setName($status->getName()); $this->setPublished($status->isPublished()); $this->setInitial($status->isInitial()); $this->setDisplayColor($status->getDisplayColor()); $this->setLabels($status->getLabels()); $this->setBlockedEdition($status->isBlockedEdition()); $this->setOutOfWorkflow($status->isOutOfWorkflow()); foreach ($status->getToRoles() as $toRole) { $this->addToRole($toRole); } foreach ($status->getFromRoles() as $fromRole) { $this->addFromRole($fromRole); } }