-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'pu/pm/TbCalMakeEventAttendeeHandleDependentRecs' into '…
…2024.11' tweak(TB/Cal) make cal event attendees handle dependent records See merge request tine20/tine20!5722
- Loading branch information
Showing
9 changed files
with
130 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?php declare(strict_types=1); | ||
/** | ||
* Tine 2.0 | ||
* | ||
* @package Calendar | ||
* @subpackage Controller | ||
* @license http://www.gnu.org/licenses/agpl.html AGPL Version 3 | ||
* @author Paul Mehrer <p.mehrer@metaways.de> | ||
* @copyright Copyright (c) 2024 Metaways Infosystems GmbH (http://www.metaways.de) | ||
*/ | ||
|
||
/** | ||
* Calendar Attender FAKE Controller, used to set dependent records on attendees | ||
* | ||
* @package Calendar | ||
* @subpackage Controller | ||
*/ | ||
class Calendar_Controller_Attender extends Tinebase_Controller_Record_Abstract | ||
{ | ||
use Tinebase_Controller_SingletonTrait; | ||
|
||
protected function __construct() | ||
{ | ||
$this->_applicationName = Calendar_Config::APP_NAME; | ||
$this->_modelName = Calendar_Model_Attender::class; | ||
$this->_backend = new Tinebase_Backend_Sql([ | ||
Tinebase_Backend_Sql::MODEL_NAME => $this->_modelName, | ||
Tinebase_Backend_Sql::TABLE_NAME => Calendar_Model_Attender::TABLE_NAME, | ||
Tinebase_Backend_Sql::MODLOG_ACTIVE => true, | ||
]); | ||
$this->_purgeRecords = false; | ||
$this->_doContainerACLChecks = false; | ||
$this->_doRightChecks = false; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?php declare(strict_types=1); | ||
/** | ||
* expands records based on provided definition | ||
* | ||
* @package Tinebase | ||
* @subpackage Record | ||
* @license http://www.gnu.org/licenses/agpl.html AGPL Version 3 | ||
* @author Paul Mehrer <p.mehrer@metaways.de> | ||
* @copyright Copyright (c) 2024 Metaways Infosystems GmbH (http://www.metaways.de) | ||
* | ||
*/ | ||
|
||
use Tinebase_ModelConfiguration_Const as MCC; | ||
|
||
class Tinebase_Record_Expander_VirtualPreExpanded extends Tinebase_Record_Expander_Property | ||
{ | ||
protected function _lookForDataToFetch(Tinebase_Record_RecordSet $_records) | ||
{ | ||
foreach ($_records as $record) { | ||
if ($record->{$this->_property} instanceof Tinebase_Record_RecordSet && $record->{$this->_property}->count() > 0) { | ||
foreach ($this->_subExpanders as $expander) { | ||
$expander->_lookForDataToFetch($record->{$this->_property}); | ||
} | ||
} | ||
} | ||
} | ||
|
||
protected function _setData(Tinebase_Record_RecordSet $_data) | ||
{ | ||
throw new Tinebase_Exception_NotImplemented('do not call this method on ' . self::class); | ||
} | ||
} |