/**
  * Create a property entity
  *
  * @param string  $property
  * @param boolean $editable
  * @param Role    $role
  */
 public function addProperty($property, $editable, Role $role)
 {
     $propertyEntity = new ProfileProperty();
     $propertyEntity->setProperty($property);
     $propertyEntity->setIsEditable($editable);
     $propertyEntity->setRole($role);
     $this->om->persist($propertyEntity);
     $this->om->flush();
 }
Esempio n. 2
0
 public function profileProperty($property, $role, $isEditable = true)
 {
     $profileProperty = new ProfileProperty();
     $profileProperty->setProperty($property);
     $profileProperty->setIsEditable($isEditable);
     $profileProperty->setRole($this->role($role));
     $this->om->persist($profileProperty);
     return $profileProperty;
 }