Skip to content

Commit

Permalink
tweak(Calendar): rename eventTypes to snake_case
Browse files Browse the repository at this point in the history
  • Loading branch information
corneliusweiss committed Sep 10, 2024
1 parent c3c97c7 commit baf6fb2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions tests/tine20/Calendar/Controller/EventTests.php
Original file line number Diff line number Diff line change
Expand Up @@ -2781,8 +2781,8 @@ public function testEventTypeFilter()
$event = $this->_controller->create($event);

$event->event_types = new Tinebase_Record_RecordSet('Calendar_Model_EventTypes', array(
array('record' => $event->getId(), 'eventType' => $eventType1->getId()),
array('record' => $event->getId(), 'eventType' => $eventType2->getId()),
array('record' => $event->getId(), Calendar_Model_EventTypes::FLD_EVENT_TYPE => $eventType1->getId()),
array('record' => $event->getId(), Calendar_Model_EventTypes::FLD_EVENT_TYPE => $eventType2->getId()),
));

$event = $this->_controller->update($event);
Expand Down
2 changes: 1 addition & 1 deletion tine20/Calendar/Model/Event.php
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ class Calendar_Model_Event extends Tinebase_Record_Abstract
Tinebase_Record_Expander::EXPANDER_PROPERTIES => [
'event_types' => [
Tinebase_Record_Expander::EXPANDER_PROPERTIES => [
'eventType' => [],
Calendar_Model_EventTypes::FLD_EVENT_TYPE => [],
],
],
],
Expand Down
8 changes: 4 additions & 4 deletions tine20/Calendar/Model/EventTypes.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
*/
class Calendar_Model_EventTypes extends Tinebase_Record_NewAbstract
{
const FLD_EVENT_TYPE = 'eventType';
const FLD_EVENT_TYPE = 'event_type';
const FLD_RECORD = 'record';

const MODEL_NAME_PART = 'EventTypes';
Expand All @@ -34,7 +34,7 @@ class Calendar_Model_EventTypes extends Tinebase_Record_NewAbstract
self::VERSION => 1,
self::RECORD_NAME => 'Event Type',
self::RECORDS_NAME => 'Event Types', // ngettext('Event Type', 'Event Types', n)
self::TITLE_PROPERTY => '{{ eventType.name }}',
self::TITLE_PROPERTY => '{{ event_type.name }}',
self::DEFAULT_SORT_INFO => [self::FIELD => self::FLD_EVENT_TYPE],
self::HAS_RELATIONS => false,
self::HAS_CUSTOM_FIELDS => false,
Expand Down Expand Up @@ -79,8 +79,8 @@ class Calendar_Model_EventTypes extends Tinebase_Record_NewAbstract

self::JSON_EXPANDER => [
Tinebase_Record_Expander::EXPANDER_PROPERTIES => [
'eventType' => [],
'record' => []
Calendar_Model_EventTypes::FLD_EVENT_TYPE => [],
Calendar_Model_EventTypes::FLD_RECORD => []
],
],

Expand Down

0 comments on commit baf6fb2

Please sign in to comment.