Back to UpdateCoreCommand class

Method setUpdateModel

public void
setUpdateModel
()
Sets the Update Model
Returns
  • void
Since
  • 4.0.0

Method setUpdateModel - Source code

/**
 * Sets the Update Model
 *
 * @return void
 *
 * @since 4.0.0
 */
public function setUpdateModel() : void
{
    $app = $this->getApplication();
    $updatemodel = $app->bootComponent('com_joomlaupdate')->getMVCFactory($app)->createModel('Update', 'Administrator');
    if (is_bool($updatemodel)) {
        $this->updateModel = $updatemodel;
        return;
    }
    $updatemodel->purge();
    $updatemodel->refreshUpdates(true);
    $this->updateModel = $updatemodel;
}