Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
sg_jobs
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
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
TYPO3
sg_jobs
Commits
8626e205
Verified
Commit
8626e205
authored
1 year ago
by
Kevin Ditscheid
Browse files
Options
Downloads
Patches
Plain Diff
[BUGFIX] Lighten the ControlViewHelper and remove stuff that's not necessary
parent
c6d44867
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!48
[TASK] Require TYPO3 12
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Classes/ViewHelpers/Backend/CompanyLabelViewHelper.php
+1
-1
1 addition, 1 deletion
Classes/ViewHelpers/Backend/CompanyLabelViewHelper.php
Classes/ViewHelpers/Backend/ControlViewHelper.php
+2
-12
2 additions, 12 deletions
Classes/ViewHelpers/Backend/ControlViewHelper.php
with
3 additions
and
13 deletions
Classes/ViewHelpers/Backend/CompanyLabelViewHelper.php
+
1
−
1
View file @
8626e205
...
...
@@ -32,7 +32,7 @@ use TYPO3\CMS\Core\Utility\GeneralUtility;
use
TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper
;
/**
* Class Co
ntro
lViewHelper
* Class Co
mpanyLabe
lViewHelper
**/
class
CompanyLabelViewHelper
extends
AbstractViewHelper
{
/**
...
...
This diff is collapsed.
Click to expand it.
Classes/ViewHelpers/Backend/ControlViewHelper.php
+
2
−
12
View file @
8626e205
...
...
@@ -29,8 +29,6 @@ namespace SGalinski\SgJobs\ViewHelpers\Backend;
use
SGalinski\SgJobs\Domain\Model\Job
;
use
TYPO3\CMS\Backend\RecordList\DatabaseRecordList
;
use
TYPO3\CMS\Backend\Utility\BackendUtility
;
use
TYPO3\CMS\Core\Localization\LanguageService
;
use
TYPO3\CMS\Core\Page\PageRenderer
;
use
TYPO3\CMS\Core\Type\Bitmask\Permission
;
use
TYPO3\CMS\Core\Utility\GeneralUtility
;
use
TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper
;
...
...
@@ -61,19 +59,11 @@ class ControlViewHelper extends AbstractViewHelper {
$row
=
$this
->
arguments
[
'row'
];
$row
=
BackendUtility
::
getRecord
(
'tx_sgjobs_domain_model_job'
,
$row
[
'uid'
]);
// force reading of core file into $GLOBALS['LANG'], because the ->labels array will be empty otherwise
$GLOBALS
[
'LANG'
]
->
includeLLFile
(
'EXT:core/Resources/Private/Language/locallang_mod_web_list.xlf'
);
/** @var DatabaseRecordList $databaseRecordList */
$databaseRecordList
=
GeneralUtility
::
makeInstance
(
DatabaseRecordList
::
class
);
$databaseRecordList
->
setRequest
(
$this
->
renderingContext
->
getRequest
());
$pageInfo
=
BackendUtility
::
readPageAccess
(
$row
[
'pid'
],
$GLOBALS
[
'BE_USER'
]
->
getPagePermsClause
(
1
));
$databaseRecordList
->
calcPerms
=
new
Permission
(
$GLOBALS
[
'BE_USER'
]
->
calcPerms
(
$pageInfo
)
);
/** @var PageRenderer $pageRenderer */
$pageRenderer
=
GeneralUtility
::
makeInstance
(
PageRenderer
::
class
);
$pageRenderer
->
loadJavaScriptModule
(
'@typo3/backend/ajax-data-handler.js'
);
$pageRenderer
->
addInlineLanguageLabelFile
(
'EXT:backend/Resources/Private/Language/locallang_alt_doc.xlf'
);
$databaseRecordList
->
calcPerms
=
new
Permission
(
$GLOBALS
[
'BE_USER'
]
->
calcPerms
(
$pageInfo
));
// DatabaseRecordList has a $prevPrevUid, which might track back a page. We won't do that, 1st+last record are
// not sortable in one direction
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment