Programming Language PHP

Namespace Oro\Bundle\ContactBundle\Entity

Class Contact

Method/Function setReportsTo

Total Examples 1

1 code examples of PHP Oro\Bundle\ContactBundle\Entity\Contact::setReportsTo extracted from open source projects

Was this example useful?
0
                                                    protected function processSingleRelations(Contact $entity)
    {
        // update source
        $source = $entity->getSource();
        if ($source) {
            $entity->setSource($this->findExistingEntity($source));
        }

        // update method
        $method = $entity->getMethod();
        if ($method) {
            $entity->setMethod($this->findExistingEntity($method));
        }

        // update assigned to
        $assignedTo = $entity->getAssignedTo();
        if ($assignedTo) {
            $entity->setAssignedTo($this->findExistingEntity($assignedTo));
        }

        // clear reports to
        $entity->setReportsTo(null);

        // update created by
        $createdBy = $entity->getCreatedBy();
        if ($createdBy) {
            $entity->setCreatedBy($this->findExistingEntity($createdBy));
        }

        // update updated by
        $updatedBy = $entity->getUpdatedBy();
        if ($updatedBy) {
            $entity->setUpdatedBy($this->findExistingEntity($updatedBy));
        }
    }