Commit 2d896d96 authored by Theo Fiedler's avatar Theo Fiedler
Browse files

[TASK] add downloadable field to flipbook record

parent 576880c3
......@@ -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
*
......
......@@ -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',
......
......@@ -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>
......@@ -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>
......@@ -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,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment