Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
services
t3o sites
typo3.org
t3o_membership
Commits
15841f3f
Commit
15841f3f
authored
Apr 29, 2017
by
Stefan Busemann
Browse files
[FEATURE] Implement sorting for memberships
parent
e8ed9682
Changes
4
Hide whitespace changes
Inline
Side-by-side
Classes/Domain/Model/Membership.php
View file @
15841f3f
...
...
@@ -53,6 +53,13 @@ class Membership extends \TYPO3\CMS\Extbase\DomainObject\AbstractValueObject
*/
protected
$noFilter
;
/**
* sorting
*
* @var int
*/
protected
$sorting
;
/**
* @return boolean
*/
...
...
@@ -151,5 +158,14 @@ class Membership extends \TYPO3\CMS\Extbase\DomainObject\AbstractValueObject
return
$this
->
personalMembership
;
}
/**
* @param int $sorting
*/
public
function
setSorting
(
$sorting
)
{
$this
->
sorting
=
$sorting
;
}
}
Classes/Domain/Repository/MemberRepository.php
View file @
15841f3f
...
...
@@ -28,7 +28,7 @@ class MemberRepository extends \TYPO3\CMS\Extbase\Persistence\Repository
* @var array
*/
protected
$defaultOrderings
=
array
(
'membership'
=>
QueryInterface
::
ORDER_ASCENDING
,
'membership
.sorting
'
=>
QueryInterface
::
ORDER_ASCENDING
,
'name'
=>
QueryInterface
::
ORDER_ASCENDING
);
...
...
Configuration/TCA/tx_t3omembership_domain_model_membership.php
View file @
15841f3f
...
...
@@ -12,7 +12,7 @@ return array(
'crdate'
=>
'crdate'
,
'cruser_id'
=>
'cruser_id'
,
'dividers2tabs'
=>
true
,
'sortby'
=>
'sorting'
,
'origUid'
=>
't3_origuid'
,
'languageField'
=>
'sys_language_uid'
,
'transOrigPointerField'
=>
'l10n_parent'
,
...
...
ext_tables.sql
View file @
15841f3f
...
...
@@ -61,6 +61,7 @@ CREATE TABLE tx_t3omembership_domain_model_membership (
hidden
tinyint
(
4
)
unsigned
DEFAULT
'0'
NOT
NULL
,
starttime
int
(
11
)
unsigned
DEFAULT
'0'
NOT
NULL
,
endtime
int
(
11
)
unsigned
DEFAULT
'0'
NOT
NULL
,
sorting
int
(
11
)
unsigned
DEFAULT
'0'
NOT
NULL
,
t3_origuid
int
(
11
)
DEFAULT
'0'
NOT
NULL
,
sys_language_uid
int
(
11
)
DEFAULT
'0'
NOT
NULL
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment