-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[TASK] Created check field in page properties
- Loading branch information
Richard Haeser
committed
Oct 3, 2019
1 parent
ece2010
commit ede5bc8
Showing
8 changed files
with
139 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
|
||
use TYPO3\CMS\Core\Utility\ExtensionManagementUtility; | ||
|
||
$llPrefix = 'LLL:EXT:page_speed_insights/Resources/Private/Language/locallang_tca.xlf:'; | ||
|
||
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns( | ||
'pages', | ||
[ | ||
'tx_pagespeedinsights_check' => [ | ||
'label' => $llPrefix . 'pages.tx_pagespeedinsights_check', | ||
'exclude' => true, | ||
'config' => [ | ||
'type' => 'check', | ||
'renderType' => 'checkboxToggle' | ||
] | ||
], | ||
] | ||
); | ||
|
||
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes( | ||
'pages', | ||
' | ||
--div--;PageSpeed Insights, tx_pagespeedinsights_check', | ||
'', | ||
'after: lastUpdated' | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
<?php | ||
$llPrefix = 'LLL:EXT:page_speed_insights/Resources/Private/Language/locallang_tca.xlf:'; | ||
|
||
return [ | ||
'ctrl' => [ | ||
'title' => $llPrefix . 'tx_pagespeedinsights_results.title', | ||
'label' => 'date', | ||
'tstamp' => 'tstamp', | ||
'crdate' => 'crdate', | ||
'cruser_id' => 'cruser_id', | ||
'languageField' => 'sys_language_uid', | ||
'sortby' => 'tstamp desc', | ||
'iconfile' => 'EXT:page_speed_insights/Resources/Public/Icons/Extension.png', | ||
'delete' => 'deleted', | ||
'versioningWS' => true, | ||
], | ||
'columns' => [ | ||
'date' => [ | ||
'exclude' => true, | ||
'label' => $llPrefix . 'tx_pagespeedinsights_results.date', | ||
'config' => [ | ||
'type' => 'input', | ||
'eval' => 'trim' | ||
] | ||
], | ||
'mobile_score_performance' => [ | ||
'exclude' => true, | ||
'label' => $llPrefix . 'tx_pagespeedinsights_results.mobile_score_performance', | ||
'config' => [ | ||
'type' => 'input', | ||
'eval' => 'trim' | ||
] | ||
], | ||
'sys_language_uid' => [ | ||
'exclude' => true, | ||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.language', | ||
'config' => [ | ||
'type' => 'select', | ||
'renderType' => 'selectSingle', | ||
'foreign_table' => 'sys_language', | ||
'foreign_table_where' => 'ORDER BY sys_language.title', | ||
'items' => [ | ||
['LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.allLanguages', -1], | ||
['LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.default_value', 0] | ||
], | ||
'default' => 0, | ||
'fieldWizard' => [ | ||
'selectIcons' => [ | ||
'disabled' => false, | ||
], | ||
], | ||
] | ||
], | ||
], | ||
'palettes' => [ | ||
'general' => [ | ||
'showitem' => 'date' | ||
], | ||
'mobile' => [ | ||
'showitem' => 'mobile_score_performance' | ||
], | ||
], | ||
'types' => [ | ||
'0' => [ | ||
'showitem' => ' | ||
--div--;Results, | ||
--palette;;general, | ||
--palette;;mobile, | ||
--div--;Visibility, sys_language_uid, | ||
' | ||
] | ||
], | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?xml version="1.0" encoding="utf-8" standalone="yes" ?> | ||
<xliff version="1.0"> | ||
<file source-language="en" datatype="plaintext" original="messages" date="2014-05-02T12:00:00Z"> | ||
<header/> | ||
<body> | ||
<trans-unit id="pages.tx_pagespeedinsights_check"> | ||
<source>Check on PageSpeed Insights</source> | ||
</trans-unit> | ||
<trans-unit id="tx_pagespeedinsights_results.title"> | ||
<source>PageSpeed Insights result</source> | ||
</trans-unit> | ||
<trans-unit id="tx_pagespeedinsights_results.date"> | ||
<source>Date</source> | ||
</trans-unit> | ||
<trans-unit id="tx_pagespeedinsights_results.mobile_score_performance"> | ||
<source>Mobile performance score</source> | ||
</trans-unit> | ||
</body> | ||
</file> | ||
</xliff> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<?php | ||
$EM_CONF[$_EXTKEY] = [ | ||
'title' => 'Page Speed Insights', | ||
'description' => 'Page Speed Insights', | ||
'title' => 'PageSpeed Insights', | ||
'description' => 'PageSpeed Insights', | ||
'category' => 'fe', | ||
'author' => 'Richard Haeser', | ||
'author_email' => '[email protected]', | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<?php | ||
|
||
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('tx_pagespeedinsights_results'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# | ||
# Table structure for table 'pages' | ||
# | ||
CREATE TABLE pages | ||
( | ||
tx_pagespeedinsights_check tinyint(4) DEFAULT '0' NOT NULL | ||
); | ||
|
||
CREATE TABLE tx_pagespeedinsights_results | ||
( | ||
mobile_score_performance tinyint(4) DEFAULT '0' NOT NULL | ||
); |