Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
colossal_menu
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
colossal_menu
Merge requests
!4
Issue
#3455416
: Resolved the machine_name error and applied the mentioned changes.
Code
Review changes
Check out branch
Download
Patches
Plain diff
Open
Issue
#3455416
: Resolved the machine_name error and applied the mentioned changes.
issue/colossal_menu-3455416:3455416-field-machinename-is
into
3.0.x
Overview
0
Commits
1
Pipelines
2
Changes
1
Open
SOURABH SISODIA
requested to merge
issue/colossal_menu-3455416:3455416-field-machinename-is
into
3.0.x
10 months ago
Overview
0
Commits
1
Pipelines
2
Changes
1
Expand
Issue
#3455416
: Resolved the machine_name error and applied the mentioned changes.
Closes
#3455416
0
0
Merge request reports
Compare
3.0.x
version 1
66a5993f
10 months ago
3.0.x (HEAD)
and
latest version
latest version
66a5993f
1 commit,
10 months ago
version 1
66a5993f
11 commits,
10 months ago
1 file
+
0
−
26
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
src/Entity/Link.php
+
0
−
26
Options
@@ -560,32 +560,6 @@ public function getDerivativeId() {
return
$this
->
get
(
'uuid'
)
->
value
;
}
/**
* {@inheritdoc}
*/
public
function
getMachineName
()
{
return
$this
->
get
(
'machine_name'
)
->
value
;
}
/**
* Checks that an existing machine name does not already exist.
*
* This is a static mehod so it can be used by a machine name field.
*
* @param string $machine_name
* The machine name to load the entity by.
*
* @return \Drupal\colossal_menu\Entity\Link|null
* Loaded Link entity or NULL if not found.
*/
public
static
function
loadByMachineName
(
$machine_name
)
{
$storage
=
\Drupal
::
service
(
'entity_type.manager'
)
->
getStorage
(
'colossal_menu_link'
);
$result
=
$storage
->
getQuery
()
->
condition
(
'machine_name'
,
$machine_name
)
->
execute
();
return
$result
?
$storage
->
loadMultiple
(
$result
)
:
[];
}
/**
* Get the database connection.
*
Loading