Sets the current date as the date added -> callback function

@param \DataContainer $objDc
432316
public static function setDateAdded(\DataContainer $objDc)
    {
        if ($objDc === null || !$objDc->id || $objDc->activeRecord->dateAdded > 0) {
            return false;
        }

        \Database::getInstance()->prepare("UPDATE $objDc->table SET dateAdded=? WHERE id=? AND dateAdded = 0")->execute(time(), $objDc->id);
    }
703917
public final void setDateDetailsCallback(Callback<DateDetailsParameter, Boolean> callback) {
        requireNonNull(callback);
        dateDetailsCallbackProperty().set(callback);
    }
961901
public function update($object)
    {
        if ($this->isNewObject($object)) {
            throw new UnknownObjectException('The object of type "' . get_class($object) . '" given to update must be persisted already, but is new.', 1249479819);
        }
        $this->hasUnpersistedChanges = true;
        $this->changedObjects->attach($object);
    }
508952
public void setDateProperty(String pstrSection, String pstrProp, 
                    			Date pdtVal, String pstrComments)
    {
        INISection objSec   = null;

        objSec = (INISection) this.mhmapSections.get(pstrSection);
        if (objSec == null)
        {
            objSec = new INISection(pstrSection);
            this.mhmapSections.put(pstrSection, objSec);
        }
        objSec.setProperty(pstrProp, utilDateToStr(pdtVal, this.mstrDateFmt), 
                        	pstrComments);
    }
876725
protected function setDate($data, $key, DateTIme $currentDate, callable $setCallback)
    {
        $date = $this->getProperty($data, $key, $currentDate);
        if ($date !== null) {
            if (is_string($date)) {
                $date = new DateTime($data[$key]);
            }
            call_user_func($setCallback, $date);
        }
    }
1191371
public function setImported($ids, $nowDate)
    {
        try {
            $coreResource = $this->getConnection();
            $tableName = $this->getTable(Schema::EMAIL_REVIEW_TABLE);
            $coreResource->update(
                $tableName,
                ['review_imported' => 1, 'updated_at' => $nowDate],
                ["review_id IN (?)" => $ids]
            );
        } catch (\Exception $e) {
            $this->helper->debug((string)$e, []);
        }
    }
1003965
public function setCreatedDate($value)
    {
        $this->_validateNotNull('CreatedDate', $value);
        $this->_validateDate('CreatedDate', $value);

        if ($this->data['created_date'] === $value) {
            return;
        }

        $this->data['created_date'] = $value;

        $this->_setModified('created_date');
    }
1299018
public function onLoadCallback(DataContainer $dc): void
    {
        if (!($dc instanceof Driver)) {
            return;
        }

        $ids = [];

        // Collect the top tags from all registries
        foreach ($this->registry->getAliases() as $alias) {
            $manager = $this->registry->get($alias);

            if ($manager instanceof DefaultManager) {
                foreach ($manager->getTopTagIds([], null, true) as $id => $count) {
                    $ids[$id] = $count;
                }
            }
        }

        // Append all other tags
        foreach ($this->db->executeQuery("SELECT id FROM {$dc->table}")->fetchAll(\PDO::FETCH_COLUMN, 0) as $id) {
            if (!\array_key_exists($id, $ids)) {
                $ids[$id] = 0;
            }
        }

        /** @var AttributeBagInterface $bag */
        $bag = $this->session->getBag('contao_backend');
        $session = $bag->all();

        // Handle the sorting selection
        switch ($session['sorting'][$dc->table]) {
            case 'total_asc':
                \asort($ids);
                break;
            case 'total_desc':
                \arsort($ids);
                break;
            default:
                $session['sorting'][$dc->table] = null;
                $bag->replace($session);

                return;
        }

        /** @var Database $db */
        $db = $this->framework->createInstance(Database::class);
        $dc->setOrderBy([$db->findInSet('id', \array_keys($ids))]);

        // Prevent adding an extra column to the listing
        $dc->setFirstOrderBy('name');
    }
472463
public function setDateRegister($dateRegister)
    {
        $dateRegister = ($dateRegister === null ? $dateRegister : (string) $dateRegister);

        if ($this->exists() && $this->dateRegister !== $dateRegister) {
            $this->updated['dateRegister'] = true;
        }

        $this->dateRegister = $dateRegister;

        return $this;
    }
1135604
protected function _setDate($oObject, $sDateFormat, $aDFields, $aDateMatches)
    {
        // formatting correct time value
        $iTimestamp = mktime(
            0,
            0,
            0,
            $aDateMatches[$aDFields[0]],
            $aDateMatches[$aDFields[1]],
            $aDateMatches[$aDFields[2]]
        );

        if ($oObject instanceof \OxidEsales\Eshop\Core\Field) {
            $oObject->setValue(@date($sDateFormat, $iTimestamp));
        } else {
            $oObject->value = @date($sDateFormat, $iTimestamp);
        }
        // we should increase (decrease) field lenght
        $oObject->fldmax_length = strlen($oObject->value);
    }
1179765
public void addFloatingDate(ICalProperty property, ICalDate date) {
		floatingDates.add(new TimezonedDate(date, property));
	}
27379
public function updateFromObject(stdClass $object)
    {
        $this->customHeaders = property_exists($object, 'customHeaders') ? $object->customHeaders : null;

        $this->sender = null;

        if (property_exists($object, 'sender')) {
            $sender = new Contact();
            $sender->updateFromObject($object->sender);

            $this->sender = $sender;
        }

        $this->from    = ContactCollection::createFromObjects(property_exists($object, 'from') ? $object->from : null);
        $this->replyTo = ContactCollection::createFromObjects(property_exists($object, 'replyTo') ? $object->from : null);
        $this->to      = ContactCollection::createFromObjects(property_exists($object, 'to') ? $object->to : null);
        $this->cc      = ContactCollection::createFromObjects(property_exists($object, 'cc') ? $object->cc : null);
        $this->bcc     = ContactCollection::createFromObjects(property_exists($object, 'bcc') ? $object->bcc : null);

        $this->date      = property_exists($object, 'date') ? new DateTime($object->date) : null;
        $this->subject   = property_exists($object, 'subject') ? $object->subject : null;
        $this->inReplyTo = property_exists($object, 'inReplyTo') ? $object->inReplyTo : null;

        $this->bodyParts = EmailBodyPartCollection::createFromObjects(property_exists($object, 'bodyParts') ? $object->bodyParts : null);
    }
1355100
public function setDatePublishEnd($datePublishEnd = null)
    {
        if (is_string($datePublishEnd)) {
            $datePublishEnd = new \DateTime($datePublishEnd);
        } elseif (!$datePublishEnd instanceof \DateTime) {
            throw new \InvalidArgumentException('Expected object of type \DateTime');
        }

        $this->datePublishEnd = $datePublishEnd;
        return $this;
    }
17733
function initializeObjectAttribute( $contentObjectAttribute, $currentVersion, $originalContentObjectAttribute )
    {
        if ( $currentVersion != false )
        {
            $dataInt = $originalContentObjectAttribute->attribute( 'data_int' );
            $contentObjectAttribute->setAttribute( 'data_int', $dataInt );
        }
        else
        {
            $contentClassAttribute = $contentObjectAttribute->contentClassAttribute();
            $defaultType = $contentClassAttribute->attribute( self::DEFAULT_FIELD );

            if ( $defaultType == 1 )
            {
                $time = new eZTime();
                $contentObjectAttribute->setAttribute( 'data_int', $time->timeOfDay() );
            }
        }
    }
189843
private function insertData($callback = null): void
    {
        $this->expression->evaluateExpressions(
            $this->configEntities[$this->entity]['pre_actions']
        );

        for ($rowNum = 1; $rowNum <= $this->limit; $rowNum++) {
            // Call the right method according to the mode
            $this->{$this->insertMode[$this->mode]}($rowNum);

            if (!is_null($callback)) {
                $callback($rowNum);
            }
        }

        // Run a final method if defined
        if ($this->mode === 'batch') {
            $this->loadDataInBatch('insert');
        }

        $this->expression->evaluateExpressions(
            $this->configEntities[$this->entity]['post_actions']
        );
    }
172352
private function preBindDoctrineEvent() : void
    {
        if(EventScheduler::instance()->has(Event::DATA_CHANGED)){
            $this->getEventManager()->addEventListener([Events::postPersist, Events::postUpdate, Events::postRemove], new Class{
                public function postPersist(LifecycleEventArgs $args) : void
                {
                    EventScheduler::instance()->trigger(Event::DATA_CHANGED, ['created', $args->getEntityManager(), $args->getEntity()]);
                }

                public function postUpdate(LifecycleEventArgs $args) : void
                {
                    EventScheduler::instance()->trigger(Event::DATA_CHANGED, ['updated', $args->getEntityManager(), $args->getEntity()]);
                }

                public function postRemove(LifecycleEventArgs $args) : void
                {
                    EventScheduler::instance()->trigger(Event::DATA_CHANGED, ['deleted', $args->getEntityManager(), $args->getEntity()]);
                }
            });
        }
    }
794715
public static void sqlcurdate(StringBuilder buf, List<? extends CharSequence> parsedArgs) throws SQLException {
    zeroArgumentFunctionCall(buf, "current_date", "curdate", parsedArgs);
  }