final class UpdateMetadata in Automatic Updates 8
Transfer object to encapsulate the details for an update.
Hierarchy
- class \Drupal\automatic_updates\UpdateMetadata
Expanded class hierarchy of UpdateMetadata
7 files declare their use of UpdateMetadata
- automatic_updates.module in ./
automatic_updates.module - Contains automatic_updates.module..
- InPlaceUpdate.php in src/
Services/ InPlaceUpdate.php - InPlaceUpdateController.php in src/
Controller/ InPlaceUpdateController.php - InPlaceUpdateController.php in tests/
modules/ test_automatic_updates/ src/ Controller/ InPlaceUpdateController.php - NotifyTest.php in tests/
src/ Functional/ NotifyTest.php
File
- src/
UpdateMetadata.php, line 8
Namespace
Drupal\automatic_updatesView source
final class UpdateMetadata {
/**
* The project name.
*
* @var string
*/
protected $projectName;
/**
* The project type.
*
* @var string
*/
protected $projectType;
/**
* The current project version.
*
* @var string
*/
protected $fromVersion;
/**
* The desired next project version.
*
* @var string
*/
protected $toVersion;
/**
* UpdateMetadata constructor.
*
* @param string $project_name
* The project name.
* @param string $project_type
* The project type.
* @param string $from_version
* The current project version.
* @param string $to_version
* The desired next project version.
*/
public function __construct($project_name, $project_type, $from_version, $to_version) {
$this->projectName = $project_name;
$this->projectType = $project_type;
$this->fromVersion = $from_version;
$this->toVersion = $to_version;
}
/**
* Get project name.
*
* @return string
* The project nam.
*/
public function getProjectName() {
return $this->projectName;
}
/**
* Set the project name.
*
* @param string $projectName
* The project name.
*
* @return \Drupal\automatic_updates\UpdateMetadata
* The update metadata.
*/
public function setProjectName($projectName) {
$this->projectName = $projectName;
return $this;
}
/**
* Get the project type.
*
* @return string
* The project type.
*/
public function getProjectType() {
return $this->projectType;
}
/**
* Set the project type.
*
* @param string $projectType
* The project type.
*
* @return \Drupal\automatic_updates\UpdateMetadata
* The update metadata.
*/
public function setProjectType($projectType) {
$this->projectType = $projectType;
return $this;
}
/**
* Get the current project version.
*
* @return string
* The current project version.
*/
public function getFromVersion() {
return $this->fromVersion;
}
/**
* Set the current project version.
*
* @param string $fromVersion
* The current project version.
*
* @return \Drupal\automatic_updates\UpdateMetadata
* The update metadata.
*/
public function setFromVersion($fromVersion) {
$this->fromVersion = $fromVersion;
return $this;
}
/**
* Get the desired next project version.
*
* @return string
* The desired next project version.
*/
public function getToVersion() {
return $this->toVersion;
}
/**
* Set the desired next project version.
*
* @param string $toVersion
* The desired next project version.
*
* @return \Drupal\automatic_updates\UpdateMetadata
* The update metadata.
*/
public function setToVersion($toVersion) {
$this->toVersion = $toVersion;
return $this;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
UpdateMetadata:: |
protected | property | The current project version. | |
UpdateMetadata:: |
protected | property | The project name. | |
UpdateMetadata:: |
protected | property | The project type. | |
UpdateMetadata:: |
protected | property | The desired next project version. | |
UpdateMetadata:: |
public | function | Get the current project version. | |
UpdateMetadata:: |
public | function | Get project name. | |
UpdateMetadata:: |
public | function | Get the project type. | |
UpdateMetadata:: |
public | function | Get the desired next project version. | |
UpdateMetadata:: |
public | function | Set the current project version. | |
UpdateMetadata:: |
public | function | Set the project name. | |
UpdateMetadata:: |
public | function | Set the project type. | |
UpdateMetadata:: |
public | function | Set the desired next project version. | |
UpdateMetadata:: |
public | function | UpdateMetadata constructor. |