/**
  * @param ObjectManager $manager
  */
 public function load(ObjectManager $manager)
 {
     if (false == $this->hasReference('workflow-function-validator-functional')) {
         $workflowFunctionValidator = new WorkflowFunction();
         $workflowFunctionValidator->addName('en', 'Validator');
         $workflowFunctionValidator->addName('fr', 'Validateur');
         $workflowFunctionValidator->addRole($this->getReference('role-production-draft-to-published'));
         $this->addReference('workflow-function-validator-production', $workflowFunctionValidator);
         $manager->persist($workflowFunctionValidator);
         $manager->flush();
     }
 }
 /**
  * @param ObjectManager $manager
  */
 public function load(ObjectManager $manager)
 {
     $workflowFunctionValidator = new WorkflowFunction();
     $workflowFunctionValidator->addName('en', 'Validator');
     $workflowFunctionValidator->addName('fr', 'Validateur');
     $workflowFunctionValidator->addRole($this->getReference('role-functional-draft-to-pending'));
     $workflowFunctionValidator->addRole($this->getReference('role-functional-pending-to-published'));
     $this->addReference('workflow-function-validator-functional', $workflowFunctionValidator);
     $workflowFunctionContributor = new WorkflowFunction();
     $workflowFunctionContributor->addName('en', 'Contributor');
     $workflowFunctionContributor->addName('fr', 'Contributeur');
     $workflowFunctionContributor->addRole($this->getReference('role-functional-published-to-draft'));
     $this->addReference('workflow-function-contributor-functional', $workflowFunctionContributor);
     $manager->persist($workflowFunctionValidator);
     $manager->persist($workflowFunctionContributor);
     $manager->flush();
 }