protected function updateTaxLossHarvesting(FormInterface $form, $subclassId, $withoutIds = array())
 {
     if ($this->user->hasRole('ROLE_RIA') && $this->user->getRiaCompanyInformation()->getIsTaxLossHarvesting()) {
         /** @var $securityAssignmentRepo SecurityAssignmentRepository */
         $securityAssignmentRepo = $this->em->getRepository('WealthbotAdminBundle:SecurityAssignment');
         $securityQueryBuilder = $securityAssignmentRepo->getSecuritiesQBBySubclassIdAndWithoutSecuritiesIds($subclassId, $withoutIds);
         $form->add($this->factory->createNamed('tax_loss_harvesting', 'entity', null, array('class' => 'WealthbotAdminBundle:SecurityAssignment', 'property' => 'security.name', 'empty_value' => 'Choose TLH Substitution', 'query_builder' => $securityQueryBuilder, 'attr' => empty($withoutIds) ? array('disabled' => 'disabled') : array(), 'required' => $securityQueryBuilder->getQuery()->getResult() ? true : false)));
     }
 }
예제 #2
0
파일: User.php 프로젝트: junjinZ/wealthbot
 /**
  * Remove clientActivitySummaries
  *
  * @param \Wealthbot\ClientBundle\Entity\ClientActivitySummary $clientActivitySummary
  */
 protected function removeClientActivitySummarie(\Wealthbot\ClientBundle\Entity\ClientActivitySummary $clientActivitySummary)
 {
     parent::removeClientActivitySummarie($clientActivitySummary);
 }