Commit ec437784 authored by vsuess's avatar vsuess
Browse files

[TASK] adding logo to member model

parent 98c1ed2b
...@@ -120,6 +120,13 @@ class Member extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity ...@@ -120,6 +120,13 @@ class Member extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
*/ */
protected $membership; protected $membership;
/**
* logo
*
* @var \TYPO3\CMS\Extbase\Domain\Model\FileReference
*/
protected $logo;
/** /**
* Returns the name * Returns the name
* *
...@@ -379,4 +386,25 @@ class Member extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity ...@@ -379,4 +386,25 @@ class Member extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
$this->membership = $membership; $this->membership = $membership;
} }
/**
* Returns the images
*
* @return \TYPO3\CMS\Extbase\Domain\Model\FileReference $logo
*/
public function getImages()
{
return $this->logo;
}
/**
* Sets the images
*
* @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $logo
* @return void
*/
public function setImages(\TYPO3\CMS\Extbase\Domain\Model\FileReference $logo)
{
$this->logo = $logo;
}
} }
...@@ -27,10 +27,10 @@ $tca = array( ...@@ -27,10 +27,10 @@ $tca = array(
'iconfile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('t3o_membership') . 'Resources/Public/Icons/tx_t3omembership_domain_model_member.gif' 'iconfile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('t3o_membership') . 'Resources/Public/Icons/tx_t3omembership_domain_model_member.gif'
), ),
'interface' => array( 'interface' => array(
'showRecordFieldList' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, name, firstname, lastname, external_id, end_date, address, zip, city, country, email, invoice_email, url, membership', 'showRecordFieldList' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, name, firstname, lastname, external_id, end_date, address, zip, city, country, email, invoice_email, url, membership, logo',
), ),
'types' => array( 'types' => array(
'1' => array('showitem' => 'sys_language_uid;;;;1-1-1, l10n_parent, l10n_diffsource, hidden;;1, name, firstname, lastname, external_id, subscription_no, end_date, address, zip, city, country, email, invoice_email, url, membership,--div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.access,starttime, endtime'), '1' => array('showitem' => 'sys_language_uid;;;;1-1-1, l10n_parent, l10n_diffsource, hidden;;1, name, firstname, lastname, external_id, subscription_no, end_date, address, zip, city, country, email, invoice_email, url, membership, logo,--div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.access,starttime, endtime'),
), ),
'palettes' => array( 'palettes' => array(
'1' => array('showitem' => ''), '1' => array('showitem' => ''),
...@@ -235,6 +235,53 @@ $tca = array( ...@@ -235,6 +235,53 @@ $tca = array(
'maxitems' => 1, 'maxitems' => 1,
), ),
), ),
'logo' => array(
'exclude' => 0,
'label' => 'LLL:EXT:t3o_membership/Resources/Private/Language/locallang_db.xlf:tx_t3omembership_domain_model_member.logo',
'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig(
'image',
array(
'appearance' => array(
'createNewRelationLinkTitle' =>
'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:images.addFileReference'
),
'foreign_types' => array(
'0' => array(
'showitem' => '
--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
--palette--;;filePalette'
),
\TYPO3\CMS\Core\Resource\File::FILETYPE_TEXT => array(
'showitem' => '
--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
--palette--;;filePalette'
),
\TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => array(
'showitem' => '
--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
--palette--;;filePalette'
),
\TYPO3\CMS\Core\Resource\File::FILETYPE_AUDIO => array(
'showitem' => '
--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
--palette--;;filePalette'
),
\TYPO3\CMS\Core\Resource\File::FILETYPE_VIDEO => array(
'showitem' => '
--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
--palette--;;filePalette'
),
\TYPO3\CMS\Core\Resource\File::FILETYPE_APPLICATION => array(
'showitem' => '
--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
--palette--;;filePalette'
)
),
'maxitems' => 1
),
'svg'
),
),
), ),
); );
......
...@@ -49,6 +49,9 @@ ...@@ -49,6 +49,9 @@
<trans-unit id="tx_t3omembership_domain_model_member.membership"> <trans-unit id="tx_t3omembership_domain_model_member.membership">
<source>Membership</source> <source>Membership</source>
</trans-unit> </trans-unit>
<trans-unit id="tx_t3omembership_domain_model_member.logo">
<source>Logo</source>
</trans-unit>
<trans-unit id="tx_t3omembership_domain_model_membership"> <trans-unit id="tx_t3omembership_domain_model_membership">
<source>Membership</source> <source>Membership</source>
......
...@@ -21,6 +21,7 @@ CREATE TABLE tx_t3omembership_domain_model_member ( ...@@ -21,6 +21,7 @@ CREATE TABLE tx_t3omembership_domain_model_member (
lastname varchar(255) DEFAULT '' NOT NULL, lastname varchar(255) DEFAULT '' NOT NULL,
membership int(11) unsigned DEFAULT '0', membership int(11) unsigned DEFAULT '0',
agency int(11) unsigned DEFAULT '0', agency int(11) unsigned DEFAULT '0',
logo int(11) unsigned NOT NULL default '0',
tstamp int(11) unsigned DEFAULT '0' NOT NULL, tstamp int(11) unsigned DEFAULT '0' NOT NULL,
crdate int(11) unsigned DEFAULT '0' NOT NULL, crdate 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