public function createConversionAction()
 {
     $profileId = $this->Request()->getParam('profileId');
     $data = $this->Request()->getParam('data', 1);
     $manager = $this->getModelManager();
     $profileRepository = $manager->getRepository(Profile::class);
     $profileEntity = $profileRepository->findOneBy(['id' => $profileId]);
     $expressionEntity = new Expression();
     $expressionEntity->setProfile($profileEntity);
     $expressionEntity->setVariable($data['variable']);
     $expressionEntity->setExportConversion($data['exportConversion']);
     $expressionEntity->setImportConversion($data['importConversion']);
     $manager->persist($expressionEntity);
     $manager->flush();
     $this->View()->assign(['success' => true, 'data' => ["id" => $expressionEntity->getId(), 'profileId' => $expressionEntity->getProfile()->getId(), 'exportConversion' => $expressionEntity->getExportConversion(), 'importConversion' => $expressionEntity->getImportConversion()]]);
 }
 /**
  * Adds an expression to the profile.
  *
  * @param Expression $expression
  *
  * @return $this
  */
 public function addExpression($expression)
 {
     $this->expressions[] = $expression;
     $expression->setProfile($this);
     return $this;
 }