CMS  Version 3.9
ComponentUpdateLog Class Reference

Inherits DataItem.

Static Public Member Functions

static recordUpdate ($component, $version_number, $description="", $fileName)
 
static getLatestVersion ($component)
 
static getLogs ($component_name)
 

Public Attributes

 $table = "component_update_log"
 
 $primary_key = "component_update_log_id"
 
 $fields
 

Detailed Description

Definition at line 9 of file component_update_log.inc.

Member Function Documentation

◆ getLatestVersion()

static ComponentUpdateLog::getLatestVersion (   $component)
static

Definition at line 36 of file component_update_log.inc.

37  {
38  return Query::create(ComponentUpdateLog, "WHERE component=:component")
39  ->bind(":component", $component)
40  ->executeValue("MAX(version_number)");
41  }
$component
Definition: help.inc:38

◆ getLogs()

static ComponentUpdateLog::getLogs (   $component_name)
static

Definition at line 43 of file component_update_log.inc.

44  {
45  return Query::create(ComponentUpdateLog, "WHERE component=:component_name ORDER BY version_number")
46  ->bind(":component_name", $component_name)
47  ->execute();
48  }

◆ recordUpdate()

static ComponentUpdateLog::recordUpdate (   $component,
  $version_number,
  $description = "",
  $fileName 
)
static

Definition at line 24 of file component_update_log.inc.

25  {
26  $log = new ComponentUpdateLog();
27  $log->component = $component;
28  $log->version_number = $version_number;
29  $log->description = $description;
30  $log->filename = $fileName;
31  $log->date_updated = now();
32 
33  $log->save();
34  }

Member Data Documentation

◆ $fields

ComponentUpdateLog::$fields
Initial value:
= array(
"component_update_log_id" => Number,
"component" => String,
"version_number" => Number,
"date_updated" => DateTime,
"description" => Text,
"filename" => String
)

Definition at line 14 of file component_update_log.inc.

◆ $primary_key

ComponentUpdateLog::$primary_key = "component_update_log_id"

Definition at line 12 of file component_update_log.inc.

◆ $table

ComponentUpdateLog::$table = "component_update_log"

Definition at line 11 of file component_update_log.inc.


The documentation for this class was generated from the following file: