public function refresh()
    {
        return static::findOne($this->getPrimaryKey(true))->then(
            function($record) {
                /* @var $record BaseActiveRecord */
                $result = $this->refreshInternal($record);
                return $result ? true : reject(false);
            }
        );
    }
public function refresh()
    {
        return static::findOne($this->getPrimaryKey(true))->then(
            function($record) {
                /* @var $record BaseActiveRecord */
                $result = $this->refreshInternal($record);
                return $result ? true : reject(false);
            }
        );
    }
public function refresh ( ) { return static :: findOne ( $ this -> getPrimaryKey ( true ) ) -> then ( function ( $ record ) { /* @var $record BaseActiveRecord */ $ result = $ this -> refreshInternal ( $ record ) ; return $ result ? true : reject ( false ) ; } ) ; }
Repopulates this active record with the latest data.

If the refresh is successful, an [[EVENT_AFTER_REFRESH]] event will be triggered.

@return ExtendedPromiseInterface with bool whether the row still exists in the database. If `true`, the latest data
will be populated to this active record. Otherwise, this record will remain unchanged.
Repopulates this active record with the latest data .