Commit 842fbf56 authored by Stefan Busemann's avatar Stefan Busemann
Browse files

[FEATURE] Implement URL for company members, introduce personal membership

Resolves #73468
parent ec815108
...@@ -51,8 +51,9 @@ class Tx_T3oMembership_Controller_MemberController extends Tx_Extbase_MVC_Contro ...@@ -51,8 +51,9 @@ class Tx_T3oMembership_Controller_MemberController extends Tx_Extbase_MVC_Contro
* @param Tx_T3oMembership_Domain_Repository_MembershipRepository $membershipRepository * @param Tx_T3oMembership_Domain_Repository_MembershipRepository $membershipRepository
* @return void * @return void
*/ */
public function injectMembershipRepository(Tx_T3oMembership_Domain_Repository_MembershipRepository $membershipRepository) public function injectMembershipRepository(
{ Tx_T3oMembership_Domain_Repository_MembershipRepository $membershipRepository
) {
$this->membershipRepository = $membershipRepository; $this->membershipRepository = $membershipRepository;
} }
......
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
/** /**
* Class Tx_T3oMembership_Domain_Model_Membership * Class Tx_T3oMembership_Domain_Model_Membership
*
* @author Thomas Löffler <thomas.loeffler@typo3.org> * @author Thomas Löffler <thomas.loeffler@typo3.org>
*/ */
class Tx_T3oMembership_Domain_Model_Membership extends Tx_Extbase_DomainObject_AbstractValueObject class Tx_T3oMembership_Domain_Model_Membership extends Tx_Extbase_DomainObject_AbstractValueObject
...@@ -36,6 +35,15 @@ class Tx_T3oMembership_Domain_Model_Membership extends Tx_Extbase_DomainObject_A ...@@ -36,6 +35,15 @@ class Tx_T3oMembership_Domain_Model_Membership extends Tx_Extbase_DomainObject_A
*/ */
protected $logo; protected $logo;
/**
* personalMembership
*
* @var bool
* @validate NotEmpty
*/
protected $personalMembership;
/** /**
* @return string * @return string
*/ */
...@@ -86,4 +94,37 @@ class Tx_T3oMembership_Domain_Model_Membership extends Tx_Extbase_DomainObject_A ...@@ -86,4 +94,37 @@ class Tx_T3oMembership_Domain_Model_Membership extends Tx_Extbase_DomainObject_A
$this->logo = $logo; $this->logo = $logo;
} }
} /**
\ No newline at end of file * Returns the status of a membership (personal or company)
*
* @return bool
*/
public function getPersonalMembership()
{
return $this->personalMembership;
}
/**
* Sets the logo
*
* @param bool $personalMembership
* @return void
*/
public function setPersonalMembership($personalMembership)
{
$this->personalMembership = $personalMembership;
}
/**
* Returns true, if the membership is a personal membership
*
* @return bool
*/
public function isPersonalMembership()
{
return $this->personalMembership;
}
}
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
/** /**
* Class Tx_T3oMembership_Domain_Repository_MemberRepository * Class Tx_T3oMembership_Domain_Repository_MemberRepository
*
* @author Thomas Löffler <thomas.loeffler@typo3.org> * @author Thomas Löffler <thomas.loeffler@typo3.org>
*/ */
class Tx_T3oMembership_Domain_Repository_MemberRepository extends Tx_Extbase_Persistence_Repository class Tx_T3oMembership_Domain_Repository_MemberRepository extends Tx_Extbase_Persistence_Repository
...@@ -24,7 +23,7 @@ class Tx_T3oMembership_Domain_Repository_MemberRepository extends Tx_Extbase_Per ...@@ -24,7 +23,7 @@ class Tx_T3oMembership_Domain_Repository_MemberRepository extends Tx_Extbase_Per
* @var array * @var array
*/ */
protected $defaultOrderings = array( protected $defaultOrderings = array(
'membership' => Tx_Extbase_Persistence_QueryInterface::ORDER_ASCENDING, 'membership' => Tx_Extbase_Persistence_QueryInterface::ORDER_DESCENDING,
'name' => Tx_Extbase_Persistence_QueryInterface::ORDER_ASCENDING 'name' => Tx_Extbase_Persistence_QueryInterface::ORDER_ASCENDING
); );
...@@ -38,8 +37,8 @@ class Tx_T3oMembership_Domain_Repository_MemberRepository extends Tx_Extbase_Per ...@@ -38,8 +37,8 @@ class Tx_T3oMembership_Domain_Repository_MemberRepository extends Tx_Extbase_Per
$query = $this->createQuery(); $query = $this->createQuery();
$constraints = array(); $constraints = array();
if ($filterString) { if ($filterString) {
$filterString = $this->getDatabaseConnection() $filterString = $this->getDatabaseConnection()->escapeStrForLike($filterString,
->escapeStrForLike($filterString, 'tx_t3omembership_domain_model_member'); 'tx_t3omembership_domain_model_member');
$constraints[] = $query->like('name', '%' . $filterString . '%'); $constraints[] = $query->like('name', '%' . $filterString . '%');
} }
if ($filterMembership) { if ($filterMembership) {
...@@ -56,4 +55,4 @@ class Tx_T3oMembership_Domain_Repository_MemberRepository extends Tx_Extbase_Per ...@@ -56,4 +55,4 @@ class Tx_T3oMembership_Domain_Repository_MemberRepository extends Tx_Extbase_Per
{ {
return $GLOBALS['TYPO3_DB']; return $GLOBALS['TYPO3_DB'];
} }
} }
\ No newline at end of file
...@@ -53,7 +53,8 @@ class Tx_T3oMembership_Task_ImportMembersTask extends tx_scheduler_Task ...@@ -53,7 +53,8 @@ class Tx_T3oMembership_Task_ImportMembersTask extends tx_scheduler_Task
$importFile = t3lib_div::getFileAbsFileName($importFile); $importFile = t3lib_div::getFileAbsFileName($importFile);
} }
if (!file_exists($importFile)) { if (!file_exists($importFile)) {
t3lib_div::devLog('[tx_scheduler_ImportMember]: no importfile - given value: ' . $importFile, 't3o_membership', 0); t3lib_div::devLog('[tx_scheduler_ImportMember]: no importfile - given value: ' . $importFile,
't3o_membership', 0);
return false; return false;
} else { } else {
......
...@@ -6,10 +6,10 @@ if (!defined('TYPO3_MODE')) { ...@@ -6,10 +6,10 @@ if (!defined('TYPO3_MODE')) {
$TCA['tx_t3omembership_domain_model_membership'] = array( $TCA['tx_t3omembership_domain_model_membership'] = array(
'ctrl' => $TCA['tx_t3omembership_domain_model_membership']['ctrl'], 'ctrl' => $TCA['tx_t3omembership_domain_model_membership']['ctrl'],
'interface' => array( 'interface' => array(
'showRecordFieldList' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, name, logo', 'showRecordFieldList' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, name, logo, personal_membership',
), ),
'types' => array( 'types' => array(
'1' => array('showitem' => 'sys_language_uid;;;;1-1-1, l10n_parent, l10n_diffsource, hidden;;1, name, logo,--div--;LLL:EXT:cms/locallang_ttc.xml:tabs.access,starttime, endtime'), '1' => array('showitem' => 'sys_language_uid;;;;1-1-1, l10n_parent, l10n_diffsource, hidden;;1, name, logo, personal_membership, --div--;LLL:EXT:cms/locallang_ttc.xml:tabs.access,starttime, endtime'),
), ),
'palettes' => array( 'palettes' => array(
'1' => array('showitem' => ''), '1' => array('showitem' => ''),
...@@ -114,5 +114,12 @@ $TCA['tx_t3omembership_domain_model_membership'] = array( ...@@ -114,5 +114,12 @@ $TCA['tx_t3omembership_domain_model_membership'] = array(
'size' => 5, 'size' => 5,
), ),
), ),
'personal_membership' => array(
'exclude' => 1,
'label' => 'LLL:EXT:t3o_membership/Resources/Private/Language/locallang_db.xml:tx_t3omembership_domain_model_membership.personal_membership',
'config' => array(
'type' => 'check',
),
),
), ),
); );
\ No newline at end of file
...@@ -2,6 +2,6 @@ ...@@ -2,6 +2,6 @@
$extensionClassesPath = t3lib_extMgm::extPath('t3o_membership', 'Classes/'); $extensionClassesPath = t3lib_extMgm::extPath('t3o_membership', 'Classes/');
return array( return array(
'tx_t3omembership_task_importmemberstask' => $extensionClassesPath . 'Task/ImportMembersTask.php', 'tx_t3omembership_task_importmemberstask' => $extensionClassesPath . 'Task/ImportMembersTask.php',
'tx_t3omembership_task_importmembers_additionalfieldprovider' => $extensionClassesPath . 'Task/ImportMembersAdditionalFieldProvider.php' 'tx_t3omembership_task_importmembers_additionalfieldprovider' => $extensionClassesPath . 'Task/ImportMembersAdditionalFieldProvider.php'
); );
...@@ -27,7 +27,7 @@ $EM_CONF[$_EXTKEY] = array( ...@@ -27,7 +27,7 @@ $EM_CONF[$_EXTKEY] = array(
'modify_tables' => '', 'modify_tables' => '',
'clearCacheOnLoad' => 0, 'clearCacheOnLoad' => 0,
'lockType' => '', 'lockType' => '',
'version' => '1.1.1', 'version' => '1.1.2',
'constraints' => array( 'constraints' => array(
'depends' => array(), 'depends' => array(),
'conflicts' => array(), 'conflicts' => array(),
......
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