Manager/AbstractManager.php
protected function prepareEntityForNew(AbstractEntity $entity): bool
    {
        if ($entity instanceof TimestampableInterface) {
            $entity->setCreationDate(new DateTime());
            $entity->setEditionDate(new DateTime());
        }

        return $this->prepareEntityForGet($entity);
    }
protected function prepareEntityForNew(AbstractEntity $entity): bool
    {
        if ($entity instanceof TimestampableInterface) {
            $entity->setCreationDate(new DateTime());
            $entity->setEditionDate(new DateTime());
        }

        return $this->prepareEntityForGet($entity);
    }
protected function prepareEntityForNew ( AbstractEntity $ entity ) : bool { if ( $ entity instanceof TimestampableInterface ) { $ entity -> setCreationDate ( new DateTime ( ) ) ; $ entity -> setEditionDate ( new DateTime ( ) ) ; } return $ this -> prepareEntityForGet ( $ entity ) ; }
Prepares an entity, setting its default values

@param AbstractEntity $entity

@return boolean
Prepares an entity setting its default values