Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bobgo-magento-extension
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Bob Public Utils
bobgo-magento-extension
Merge requests
!15
Tracking page
Code
Review changes
Check out branch
Download
Patches
Plain diff
Expand sidebar
Merged
Tracking page
tracking_page
into
dev
Overview
0
Commits
8
Pipelines
0
Changes
11
Merged
Christel Loftus
requested to merge
tracking_page
into
dev
11 months ago
Overview
0
Commits
8
Pipelines
0
Changes
11
0
0
Merge request reports
Compare
dev
version 7
436e55f7
11 months ago
version 6
62c32bf0
11 months ago
version 5
abe3e0eb
11 months ago
version 4
d5dc33c1
11 months ago
version 3
0b51db24
11 months ago
version 2
61a9c3d1
11 months ago
version 1
0a4fe2d8
11 months ago
dev (base)
and
version 2
latest version
17cd8bd9
8 commits,
11 months ago
version 7
436e55f7
7 commits,
11 months ago
version 6
62c32bf0
6 commits,
11 months ago
version 5
abe3e0eb
5 commits,
11 months ago
version 4
d5dc33c1
4 commits,
11 months ago
version 3
0b51db24
3 commits,
11 months ago
version 2
61a9c3d1
2 commits,
11 months ago
version 1
0a4fe2d8
1 commit,
11 months ago
11 files
+
164
−
66
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
11
Block/System/Config/Form/Field/Version.php deleted
100644 → 0
+
0
−
66
View file @ 6c214a1e
<?php
namespace
BobGroup\BobGo\Block\System\Config\Form\Field
;
use
Magento\Framework\Data\Form\Element\AbstractElement
;
use
BobGroup\BobGo\Helper\Data
;
/**
* Displays Version number in System Configuration
*
* This block is responsible for displaying the version number of the BobGo extension
* in the system configuration settings.
*
* @website https://www.bobgo.co.za
*/
class
Version
extends
\Magento\Config\Block\System\Config\Form\Field
{
/**
* @var string
*/
public
const
EXTENSION_URL
=
'https://www.bobgo.co.za'
;
/**
* @var Data
*/
protected
Data
$_helper
;
/**
* Constructor
*
* @param \Magento\Backend\Block\Template\Context $context
* @param Data $helper
*/
public
function
__construct
(
\Magento\Backend\Block\Template\Context
$context
,
Data
$helper
)
{
$this
->
_helper
=
$helper
;
parent
::
__construct
(
$context
);
}
/**
* Get HTML for the element
*
* @param AbstractElement $element
* @return string
*/
protected
function
_getElementHtml
(
AbstractElement
$element
):
string
{
$extensionVersion
=
$this
->
_helper
->
getExtensionVersion
();
$extensionTitle
=
'BobGo'
;
$versionLabel
=
sprintf
(
'<a href="%s" title="%s" target="_blank">%s</a>'
,
self
::
EXTENSION_URL
,
$extensionTitle
,
$extensionVersion
);
// Set the value using setData
$element
->
setData
(
'value'
,
$versionLabel
);
// Ensure the return value is a string or provide a fallback
$value
=
$element
->
getData
(
'value'
);
return
is_string
(
$value
)
?
$value
:
''
;
}
}
Loading