Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Theo Fiedler
turn
Commits
2d896d96
Commit
2d896d96
authored
Aug 22, 2017
by
Theo Fiedler
Browse files
[TASK] add downloadable field to flipbook record
parent
576880c3
Changes
5
Hide whitespace changes
Inline
Side-by-side
Classes/Domain/Model/FlipBook.php
View file @
2d896d96
...
...
@@ -53,6 +53,13 @@ class FlipBook extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
*/
protected
$hardcover
=
false
;
/**
* downloadable
*
* @var bool
*/
protected
$downloadable
=
false
;
/**
* pages
*
...
...
@@ -208,6 +215,37 @@ class FlipBook extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
return
$this
->
hardcover
;
}
/**
* Returns the downloadable
*
* @return bool $downloadable
*/
public
function
getDownloadable
()
{
return
$this
->
downloadable
;
}
/**
* Sets the downloadable
*
* @param bool $downloadable
* @return void
*/
public
function
setDownloadable
(
$downloadable
)
{
$this
->
downloadable
=
$downloadable
;
}
/**
* Returns the boolean state of downloadable
*
* @return bool
*/
public
function
isDownloadable
()
{
return
$this
->
downloadable
;
}
/**
* Adds a Page
*
...
...
Configuration/TCA/tx_turn_domain_model_flipbook.php
View file @
2d896d96
...
...
@@ -20,10 +20,10 @@ return [
'iconfile'
=>
'EXT:turn/Resources/Public/Icons/tx_turn_domain_model_flipbook.gif'
],
'interface'
=>
[
'showRecordFieldList'
=>
'sys_language_uid, l10n_parent, l10n_diffsource, hidden, title, type, pdf_file, processed, , hardcover, pages'
,
'showRecordFieldList'
=>
'sys_language_uid, l10n_parent, l10n_diffsource, hidden, title, type, pdf_file, processed, , hardcover, pages
, downloadable
'
,
],
'types'
=>
[
'1'
=>
[
'showitem'
=>
'sys_language_uid, l10n_parent, l10n_diffsource, hidden, type, title, pdf_file, hardcover, pages, --div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.access, starttime, endtime'
],
'1'
=>
[
'showitem'
=>
'sys_language_uid, l10n_parent, l10n_diffsource, hidden, type, title, pdf_file, hardcover, pages,
downloadable,
--div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.access, starttime, endtime'
],
],
'columns'
=>
[
'sys_language_uid'
=>
[
...
...
@@ -206,6 +206,18 @@ return [
'default'
=>
0
,
]
],
'downloadable'
=>
[
'exclude'
=>
true
,
'label'
=>
'LLL:EXT:turn/Resources/Private/Language/locallang_db.xlf:tx_turn_domain_model_flipbook.downloadable'
,
'config'
=>
[
'type'
=>
'check'
,
'items'
=>
[
'1'
=>
[
'0'
=>
'LLL:EXT:lang/locallang_core.xlf:labels.enabled'
]
],
],
],
'pages'
=>
[
'exclude'
=>
false
,
'label'
=>
'LLL:EXT:turn/Resources/Private/Language/locallang_db.xlf:tx_turn_domain_model_flipbook.pages'
,
...
...
Resources/Private/Language/locallang.xlf
View file @
2d896d96
...
...
@@ -24,6 +24,9 @@
<trans-unit
id=
"tx_turn_domain_model_flipbook.pages"
>
<source>
Pages
</source>
</trans-unit>
<trans-unit
id=
"tx_turn_domain_model_flipbook.downloadable"
>
<source>
Downloadable
</source>
</trans-unit>
<trans-unit
id=
"tx_turn_domain_model_page"
>
<source>
Page
</source>
</trans-unit>
...
...
@@ -60,4 +63,4 @@
</trans-unit>
</body>
</file>
</xliff>
\ No newline at end of file
</xliff>
Resources/Private/Language/locallang_db.xlf
View file @
2d896d96
...
...
@@ -30,6 +30,9 @@
<trans-unit
id=
"tx_turn_domain_model_flipbook.pages"
>
<source>
Pages
</source>
</trans-unit>
<trans-unit
id=
"tx_turn_domain_model_flipbook.downloadable"
>
<source>
Downloadable
</source>
</trans-unit>
<trans-unit
id=
"tx_turn_domain_model_page"
>
<source>
Page
</source>
</trans-unit>
...
...
@@ -47,4 +50,4 @@
</trans-unit>
</body>
</file>
</xliff>
\ No newline at end of file
</xliff>
ext_tables.sql
View file @
2d896d96
...
...
@@ -11,6 +11,7 @@ CREATE TABLE tx_turn_domain_model_flipbook (
processed
smallint
(
5
)
unsigned
DEFAULT
'0'
NOT
NULL
,
type
int
(
11
)
DEFAULT
'0'
NOT
NULL
,
hardcover
smallint
(
5
)
unsigned
DEFAULT
'0'
NOT
NULL
,
downloadable
smallint
(
5
)
unsigned
DEFAULT
'0'
NOT
NULL
,
pages
int
(
11
)
unsigned
DEFAULT
'0'
NOT
NULL
,
tstamp
int
(
11
)
unsigned
DEFAULT
'0'
NOT
NULL
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment