Skip to content

Commit

Permalink
solve bug 0000270
Browse files Browse the repository at this point in the history
  • Loading branch information
domjos1994 committed Aug 29, 2019
1 parent 70d7bfb commit 0d8cbf8
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 7 deletions.
15 changes: 8 additions & 7 deletions Classes/Domain/Repository/TimelineEventRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,25 @@

class TimelineEventRepository extends Repository {

/**
* @param int $uid
* @return \TYPO3\CMS\Extbase\Persistence\QueryResultInterface
*/
/**
* @param int $uid
* @param $order
* @return \TYPO3\CMS\Extbase\Persistence\QueryResultInterface
*/
public function getContentElementEntries($uid, $order) {
$query = $this->createQuery();
$ordering = null;

switch ($order) {
case "none":
$ordering = [];
break;
case "asc":
$ordering = ['start_date' => Query::ORDER_ASCENDING];
break;
case "desc":
$ordering = ['start_date' => Query::ORDER_DESCENDING];
break;
default:
$ordering = ['sorting' => Query::ORDER_ASCENDING];
break;
}

$query->getQuerySettings()->setRespectStoragePage(false);
Expand Down
11 changes: 11 additions & 0 deletions Configuration/TCA/Overrides/tt_content.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,25 @@
'foreign_table' => 'tx_timeline_domain_model_timelineevent',
'foreign_field' => 'timetable_id',
'foreign_label' => 'title',
'foreign_sortby' => 'sorting',
'maxitems' => '100',
'appearance' => array(
#'collapseAll' => 0,
'expandSingle' => true,
'useSortable' => true,
'newRecordLinkAddTitle' => 1,
'newRecordLinkPosition' => 'both',
'showAllLocalizationLink' => true,
'showPossibleLocalizationRecords' => true,
'enabledControls' => [
'info' => true,
'new' => true,
'dragdrop' => true,
'sort' => true,
'hide' => true,
'delete' => true,
'localize' => true,
],
),
'behaviour' => array(
'localizationMode' => 'select',
Expand Down

0 comments on commit 0d8cbf8

Please sign in to comment.