| @@ 12-53 (lines=42) @@ | ||
| 9 | use Sugarcrm\UpgradeSpec\Template\RendererAwareInterface; |
|
| 10 | use Sugarcrm\UpgradeSpec\Template\RendererAwareTrait; |
|
| 11 | ||
| 12 | class ReleaseNotes implements ElementInterface, RendererAwareInterface, DataAwareInterface |
|
| 13 | { |
|
| 14 | use RendererAwareTrait, DataAwareTrait; |
|
| 15 | ||
| 16 | /** |
|
| 17 | * @return string |
|
| 18 | */ |
|
| 19 | public function getTitle() |
|
| 20 | { |
|
| 21 | return 'Review release notes'; |
|
| 22 | } |
|
| 23 | ||
| 24 | /** |
|
| 25 | * @return int |
|
| 26 | */ |
|
| 27 | public function getOrder() |
|
| 28 | { |
|
| 29 | return 1; |
|
| 30 | } |
|
| 31 | ||
| 32 | /** |
|
| 33 | * @param Upgrade $context |
|
| 34 | * |
|
| 35 | * @return bool |
|
| 36 | */ |
|
| 37 | public function isRelevantTo(Upgrade $context) |
|
| 38 | { |
|
| 39 | return true; |
|
| 40 | } |
|
| 41 | ||
| 42 | /** |
|
| 43 | * @param Upgrade $context |
|
| 44 | * |
|
| 45 | * @return string |
|
| 46 | */ |
|
| 47 | public function getBody(Upgrade $context) |
|
| 48 | { |
|
| 49 | return $this->renderer->render('release_notes', [ |
|
| 50 | 'release_notes' => $this->dataManager->getReleaseNotes($context), |
|
| 51 | ]); |
|
| 52 | } |
|
| 53 | } |
|
| 54 | ||
| @@ 12-53 (lines=42) @@ | ||
| 9 | use Sugarcrm\UpgradeSpec\Template\RendererAwareInterface; |
|
| 10 | use Sugarcrm\UpgradeSpec\Template\RendererAwareTrait; |
|
| 11 | ||
| 12 | class UpgradeExecution implements ElementInterface, RendererAwareInterface, DataAwareInterface |
|
| 13 | { |
|
| 14 | use RendererAwareTrait, DataAwareTrait; |
|
| 15 | ||
| 16 | /** |
|
| 17 | * @return string |
|
| 18 | */ |
|
| 19 | public function getTitle() |
|
| 20 | { |
|
| 21 | return 'Upgrade your instance'; |
|
| 22 | } |
|
| 23 | ||
| 24 | /** |
|
| 25 | * @return int |
|
| 26 | */ |
|
| 27 | public function getOrder() |
|
| 28 | { |
|
| 29 | return 5; |
|
| 30 | } |
|
| 31 | ||
| 32 | /** |
|
| 33 | * @param Upgrade $context |
|
| 34 | * |
|
| 35 | * @return bool |
|
| 36 | */ |
|
| 37 | public function isRelevantTo(Upgrade $context) |
|
| 38 | { |
|
| 39 | return true; |
|
| 40 | } |
|
| 41 | ||
| 42 | /** |
|
| 43 | * @param Upgrade $context |
|
| 44 | * |
|
| 45 | * @return string |
|
| 46 | */ |
|
| 47 | public function getBody(Upgrade $context) |
|
| 48 | { |
|
| 49 | return $this->renderer->render('upgrade_execution', [ |
|
| 50 | 'upgrade_execution_howto' => $this->dataManager->getUpgraderInfo($context->getTargetVersion()), |
|
| 51 | ]); |
|
| 52 | } |
|
| 53 | } |
|
| 54 | ||