public function extract($entity)
    {
        //if entity is required then delete the entity
        $property = $this->getRepository()
                         ->getDescription()
                         ->getProperty($this->_property);
                         
        if ($property->isRequired()) {
            $entity->delete();
        } else {
            $entity->set($this->_property, null);
        }
    }
public function extract($entity)
    {
        //if entity is required then delete the entity
        $property = $this->getRepository()
                         ->getDescription()
                         ->getProperty($this->_property);
                         
        if ($property->isRequired()) {
            $entity->delete();
        } else {
            $entity->set($this->_property, null);
        }
    }
public function extract ( $ entity ) { //if entity is required then delete the entity $ property = $ this -> getRepository ( ) -> getDescription ( ) -> getProperty ( $ this -> _property ) ; if ( $ property -> isRequired ( ) ) { $ entity -> delete ( ) ; } else { $ entity -> set ( $ this -> _property , null ) ; } }
Removes an object from the aggregation.

@see AnObjectSet::extract()
Removes an object from the aggregation .