Commit 7a7800a1 authored by Thomas Löffler's avatar Thomas Löffler
Browse files

[TASK] Remove dependency to membership extension

parent 0e42870c
......@@ -14,7 +14,6 @@ namespace T3o\Randombanners\Domain\Model;
* The TYPO3 project - inspiring people to share!
*/
use T3o\T3oMembership\Domain\Model\Member;
use TYPO3\CMS\Extbase\DomainObject\AbstractEntity;
use TYPO3\CMS\Extbase\Persistence\ObjectStorage;
......@@ -63,13 +62,6 @@ class Banner extends AbstractEntity
*/
protected $clickedLastMonth;
/**
* $member
*
* @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\T3o\T3oMembership\Domain\Model\Member>
*/
protected $member = null;
/**
* @param string $name
*/
......@@ -167,44 +159,4 @@ class Banner extends AbstractEntity
{
return $this->clickedLastMonth;
}
/**
* Adds a Member
*
* @param Member $member
*/
public function addMember(Member $member)
{
$this->member->attach($member);
}
/**
* Removes a Member
*
* @param Member $memberToRemove The Member to be removed
*/
public function removeMember(Member $memberToRemove)
{
$this->member->detach($memberToRemove);
}
/**
* Returns the member
*
* @return ObjectStorage<\T3o\T3oMembership\Domain\Model\Member> $member
*/
public function getMember()
{
return $this->member;
}
/**
* Sets the members
*
* @param ObjectStorage<\T3o\T3oMembership\Domain\Model\Member> $member
*/
public function setMember(ObjectStorage $member)
{
$this->member = $member;
}
}
......@@ -26,11 +26,11 @@ return [
'iconfile' => 'EXT:randombanners/Resources/Public/Icons/tx_randombanners_domain_model_banner.gif',
],
'interface' => [
'showRecordFieldList' => 'cruser_id, pid, sys_language_uid, l10n_parent, l10n_diffsource, hidden, name, link, email, logo, clicked_this_month, clicked_last_month, member',
'showRecordFieldList' => 'cruser_id, pid, sys_language_uid, l10n_parent, l10n_diffsource, hidden, name, link, email, logo, clicked_this_month, clicked_last_month',
],
'types' => [
'1' => [
'showitem' => 'sys_language_uid;;;;1-1-1, l10n_parent, l10n_diffsource, hidden;;1, name, link, email, logo, clicked_this_month, clicked_last_month, member,--div--;LLL:EXT:cms/locallang_ttc.xml:tabs.access,starttime, endtime',
'showitem' => 'sys_language_uid;;;;1-1-1, l10n_parent, l10n_diffsource, hidden;;1, name, link, email, logo, clicked_this_month, clicked_last_month,--div--;LLL:EXT:cms/locallang_ttc.xml:tabs.access,starttime, endtime',
],
],
'palettes' => [
......@@ -181,18 +181,5 @@ return [
'readOnly' => 1,
],
],
'member' => [
'exclude' => 0,
'label' => 'LLL:EXT:t3o_membership/Resources/Private/Language/locallang_db.xlf:tx_t3omembership_domain_model_member',
'config' => [
'type' => 'select',
'renderType' => 'selectSingle',
'items' => [['none', 0]],
'foreign_table' => 'tx_t3omembership_domain_model_member',
'foreign_table_where' => 'tx_t3omembership_domain_model_member.membership=1',
'minitems' => 0,
'maxitems' => 1,
],
],
],
];
......@@ -8,16 +8,9 @@
],
"minimum-stability": "dev",
"prefer-stable": true,
"repositories": [
{
"type": "vcs",
"url": "https://git-t3o.typo3.org/t3o/t3o_membership.git"
}
],
"require": {
"typo3/cms-core": ">=10.3.0,<10.9.99",
"typo3/cms-scheduler": ">=10.3.0,<10.9.99",
"t3o/t3o_membership": "^3.0"
"typo3/cms-scheduler": ">=10.3.0,<10.9.99"
},
"keywords": [
"TYPO3 CMS"
......
......@@ -10,7 +10,6 @@ $EM_CONF['randombanners'] = [
'depends' => [
'typo3' => '10.3.0-10.99.99',
'scheduler' => '10.3.0-10.99.99',
't3o_membership' => '3.0.0-3.9.99',
],
'conflicts' => [],
],
......
......@@ -7,7 +7,5 @@ CREATE TABLE `tx_randombanners_domain_model_banner` (
`email` varchar(255) DEFAULT '' NOT NULL,
`logo` int(11) DEFAULT 0 NOT NULL,
`clicked_this_month` int(11) DEFAULT 0 NOT NULL,
`clicked_last_month` int(11) DEFAULT 0 NOT NULL,
`member` int(11) DEFAULT 0 NOT NULL
`clicked_last_month` int(11) 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