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
* @param Tx_T3oMembership_Domain_Repository_MembershipRepository $membershipRepository
* @return void
*/
public function injectMembershipRepository(Tx_T3oMembership_Domain_Repository_MembershipRepository $membershipRepository)
{
public function injectMembershipRepository(
Tx_T3oMembership_Domain_Repository_MembershipRepository $membershipRepository
) {
$this->membershipRepository = $membershipRepository;
}
......
......@@ -14,7 +14,6 @@
/**
* Class Tx_T3oMembership_Domain_Model_Membership
*
* @author Thomas Löffler <thomas.loeffler@typo3.org>
*/
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
*/
protected $logo;
/**
* personalMembership
*
* @var bool
* @validate NotEmpty
*/
protected $personalMembership;
/**
* @return string
*/
......@@ -86,4 +94,37 @@ class Tx_T3oMembership_Domain_Model_Membership extends Tx_Extbase_DomainObject_A
$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 @@
/**
* Class Tx_T3oMembership_Domain_Repository_MemberRepository
*
* @author Thomas Löffler <thomas.loeffler@typo3.org>
*/
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
* @var 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
);
......@@ -38,8 +37,8 @@ class Tx_T3oMembership_Domain_Repository_MemberRepository extends Tx_Extbase_Per
$query = $this->createQuery();
$constraints = array();
if ($filterString) {
$filterString = $this->getDatabaseConnection()
->escapeStrForLike($filterString, 'tx_t3omembership_domain_model_member');
$filterString = $this->getDatabaseConnection()->escapeStrForLike($filterString,
'tx_t3omembership_domain_model_member');
$constraints[] = $query->like('name', '%' . $filterString . '%');
}
if ($filterMembership) {
......@@ -56,4 +55,4 @@ class Tx_T3oMembership_Domain_Repository_MemberRepository extends Tx_Extbase_Per
{
return $GLOBALS['TYPO3_DB'];
}
}
\ No newline at end of file
}
......@@ -53,7 +53,8 @@ class Tx_T3oMembership_Task_ImportMembersTask extends tx_scheduler_Task
$importFile = t3lib_div::getFileAbsFileName($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;
} else {
......
......@@ -6,10 +6,10 @@ if (!defined('TYPO3_MODE')) {
$TCA['tx_t3omembership_domain_model_membership'] = array(
'ctrl' => $TCA['tx_t3omembership_domain_model_membership']['ctrl'],
'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(
'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(
'1' => array('showitem' => ''),
......@@ -114,5 +114,12 @@ $TCA['tx_t3omembership_domain_model_membership'] = array(
'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 @@
$extensionClassesPath = t3lib_extMgm::extPath('t3o_membership', 'Classes/');
return array(
'tx_t3omembership_task_importmemberstask' => $extensionClassesPath . 'Task/ImportMembersTask.php',
'tx_t3omembership_task_importmembers_additionalfieldprovider' => $extensionClassesPath . 'Task/ImportMembersAdditionalFieldProvider.php'
'tx_t3omembership_task_importmemberstask' => $extensionClassesPath . 'Task/ImportMembersTask.php',
'tx_t3omembership_task_importmembers_additionalfieldprovider' => $extensionClassesPath . 'Task/ImportMembersAdditionalFieldProvider.php'
);
......@@ -27,7 +27,7 @@ $EM_CONF[$_EXTKEY] = array(
'modify_tables' => '',
'clearCacheOnLoad' => 0,
'lockType' => '',
'version' => '1.1.1',
'version' => '1.1.2',
'constraints' => array(
'depends' => array(),
'conflicts' => array(),
......
Supports Markdown
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