SHARE
TWEET

Untitled

a guest Oct 29th, 2013 233 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /**
  2.      * action initializeCreate
  3.      *
  4.      */
  5.     public function initializeCreateAction(){
  6.             if($this->request->hasArgument('project')) {
  7.                 $project = $this->request->getArgument('project');
  8.                 $propertyMappingConfiguration = $this->arguments->getArgument('project')->getPropertyMappingConfiguration();
  9.                 $propertyMappingConfiguration->allowProperties('branch');
  10.                 if(!empty($project['branch'])) {
  11.                     $propertyMappingConfiguration->forProperty('branch')->allowAllProperties();
  12.                     $propertyMappingConfiguration->allowModificationForSubProperty('branch');
  13.    
  14.                     foreach($project['branch'] as $branchIndex => $branchPropertyArray) {
  15.                         $propertyPath = 'branch.' . $branchIndex;
  16.                         $propertyMappingConfiguration->forProperty($propertyPath)->allowAllProperties();
  17.                         $propertyMappingConfiguration->allowCreationForSubProperty($propertyPath);
  18.                         $propertyMappingConfiguration->allowModificationForSubProperty($propertyPath);
  19.                
  20.                     } // end foreach
  21.                 } // end if(!empty)
  22.  
  23.                 $propertyMappingConfiguration->allowProperties('documents');
  24.                 if(!empty($project['documents'])) {
  25.                     $propertyMappingConfiguration->forProperty('documents')->allowAllProperties();
  26.                     $propertyMappingConfiguration->allowModificationForSubProperty('documents');
  27.    
  28.                     foreach($project['documents'] as $documentIndex => $documentPropertyArray) {
  29.                         $propertyPath = 'documents.' . $documentIndex;
  30.                         $propertyMappingConfiguration->forProperty($propertyPath)->allowAllProperties();
  31.                         $propertyMappingConfiguration->allowCreationForSubProperty($propertyPath);
  32.                         $propertyMappingConfiguration->allowModificationForSubProperty($propertyPath);
  33.                
  34.                     } // end foreach
  35.                 } // end if(!empty)
  36.                                
  37.             } // end if(request->hasArgument)
  38.        
  39.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top