Called after record successfully created
970099
public function postCreate()
    {
        $revisions[] = array(
            'revisionable_type' => get_class($this),
            'revisionable_id' => $this->getKey(),
            'attribute' => 'created_at',
            'old_value' => null,
            'new_value' => $this->created_at,
            'user_id' => $this->getUserId(),
            'created_at' => new \DateTime(),
            'updated_at' => new \DateTime(),
        );
        $revision = new Revision;
        \DB::table($revision->getTable())->insert($revisions);
    }
1132917
public function afterInsert()
    {
        /** @var \yii\db\ActiveRecord|\DevGroup\DataStructure\traits\PropertiesTrait $owner */
        $owner = $this->owner;
        $groups = $owner->propertyGroupIds;
        $owner->propertyGroupIds = null;
        $event = new HasPropertiesEvent();
        $event->model = $owner;
        HasPropertiesEvent::trigger(self::class, self::EVENT_AFTER_SAVE, $event);
        if (count($groups) > 0) {
            foreach ($groups as $group_id) {
                /** @var PropertyGroup $group */
                $group = PropertyGroup::findOne(['id' => $group_id]);
                if ($group) {
                    $owner->addPropertyGroup($group);
                }
            }
        }

        $handlers = PropertyStorageHelper::getHandlersForModel($owner);
        $models = [&$owner];
        foreach ($handlers as $handler) {
            $handler->modelsInserted($models);
        }
        $this->afterSave();
    }
553145
public function afterRegistry()
    {
        parent::afterRegistry();

        $this->model = $this->loader->getModels()->getRespondentModel(true);
        if ($this->addLoginCheck) {
            $this->model->addLoginCheck();
        }
        // Load the data
        $this->refresh();
    }
1335566
public void init(Rec record)
    {
        m_dataSource = null;
        this.setRecord(record);
        if (record != null)
        {
            Object owner = record.getOwner();
            record.setOwner(null);  // Make sure I don't create a new table when I call getTable().
            if (record.getTable() == null)
                record.setTable(this);  // Just being careful (Note: Thick model does create a table before calling this method)
            record.setOwner(owner);  // Restore
        }
    }
699310
public function afterRegistry()
    {
        parent::afterRegistry();

        if (! $this->model instanceof \Gems_Model_RespondentModel) {
            $this->model = $this->loader->getModels()->getRespondentModel(true);
        }
    }
339944
@Override
    public void onViewCreated(View view, Bundle savedInstanceState) {
        super.onViewCreated(view, savedInstanceState);
        ensureContent();
    }
326704
def post_save_event_listener(sender, instance, created):
    """"""
    if not instance._meta.event_ready:
        return

    if created:
        instance.create_creation_event()
    else:
        instance.create_update_event()

    # Reset the original key
    instance._original = None
804492
def after_insert(mapper, connection, target):
    """"""
    record_after_update.send(CmtRECORDCOMMENT, recid=target.id_bibrec)

    from .api import get_reply_order_cache_data
    if target.in_reply_to_id_cmtRECORDCOMMENT > 0:
        parent = CmtRECORDCOMMENT.query.get(
            target.in_reply_to_id_cmtRECORDCOMMENT)
        if parent:
            trans = connection.begin()
            parent_reply_order = parent.reply_order_cached_data \
                if parent.reply_order_cached_data else ''
            parent_reply_order += get_reply_order_cache_data(target.id)
            connection.execute(
                db.update(CmtRECORDCOMMENT.__table__).
                where(CmtRECORDCOMMENT.id == parent.id).
                values(reply_order_cached_data=parent_reply_order))
            trans.commit()
718860
public function afterRegistry()
    {
        parent::afterRegistry();

        $this->addColumn($this->util->getTokenData()->getStatusExpression(), 'status');

        if (! $this->request instanceof \Zend_Controller_Request_Abstract) {
            $this->request = \Zend_Controller_Front::getInstance()->getRequest();
        }
    }
327275
private void afterRecord() {
        if (fileNamePattern != null && getRecordCounter() % splitlimit == 0) {
            try {
                endCollection();
                writer.close();
                newWriter(fileNamePattern, fileNameCounter, bufferSize, compress);
                setupEventConsumer(writer, indent);
                beginCollection();
            } catch (IOException e) {
                logger.log(Level.SEVERE, e.getMessage(), e);
            }
        }
    }
993042
def insert_after(self, key, new_item, instance=0):
        """"""
        self._insert_item(key, new_item, instance, True)
375466
def _after_handler(self, iid, callback, args):
        """"""
        self._after_id = None
        self.update_state(iid, "normal")
        self.call_callbacks(iid, callback, args)
962318
public function onAfterWrite() {
		parent::onAfterWrite();
		if($this->_isCreating === true) {
			$this->_isCreating = false;
			$this->extend('onAfterCreate');
		}
	}
1121037
function(rowIndex) {

      if(!this.dialog) {
         this.renderDialog();
      }

      // NOT Inserting new record
		this.insertNewRecord = false;
		
		// Set the selected Record
		this.selectedRecord = rowIndex;
		
		// Get the selected Record
		var record = this.datatable.getRecord(this.selectedRecord);
		
		this.dialog.whenFormAvailable({
			fn: function() {
				this.dialog.setValue(record.getData());
				this.dialog.show();
			},
			scope: this
		});
		
	}
1363838
public function postCreate() {
        $Model = $this->Model;

        $record = $Model::create(Input::all());

        return ( $record->errors )
            ? $this->failure($record, $record->getErrors())
            : $this->success($record);

    }
505598
function done(error) {
    if (error) {
      errors.push(error);
    }
    if (--initializing <= 0) {
      if (errors && errors.length) {
        var errorResult = new Error('Errors occurred during initialization.');
        errorResult.initializationErrors = errors;
        callback(errorResult);
      } else {
        processPostInitializeQueue(postInitializeQueue, callback);
      }
    }
  }
1370545
public function afterSave()
    {
        if ($this->file instanceof UploadedFile !== true) {
            return;
        }

        $path = $this->getUploadedFilePath($this->attribute);

        FileHelper::createDirectory(pathinfo($path, PATHINFO_DIRNAME), 0775, true);

        if (!$this->file->saveAs($path)) {
            throw new FileUploadException($this->file->error, 'File saving error.');
        }

        $this->owner->trigger(static::EVENT_AFTER_FILE_SAVE);
    }