Esempio n. 1
0
 public function preUpdate(PreUpdateEventArgs $args)
 {
     echo 'sup;';
     exit;
     $entity = $args->getObject();
     if ($entity instanceof TrackModifications) {
         $args->setNewValue("lastModification", new \DateTime());
     }
 }
Esempio n. 2
0
 /**
  * Constructor.
  *
  * @param object          $document
  * @param DocumentManager $objectManager
  * @param array           $changeSet
  */
 public function __construct($document, DocumentManager $documentManager, array &$changeSet)
 {
     $fieldChangeSet = array();
     if (isset($changeSet['fields'])) {
         $fieldChangeSet =& $changeSet['fields'];
     }
     parent::__construct($document, $documentManager, $fieldChangeSet);
     $this->documentChangeSet =& $changeSet;
 }