public function _defaultAclRole($from, $to, $action)
{
switch ($action) {
case static::ACT_CONVERT_TO_OBJECT:
/* @var $from TeamEnvs */
$to->defaultAclRole = ['id' => $from->getTeam()->accountRoleId];
break;
case static::ACT_CONVERT_TO_ENTITY:
/* @var $to TeamEnvs */
// now its only Team property
throw new ApiNotImplementedErrorException('Adjustment the default ACL Role for the Environment has not been implemented yet.');
case static::ACT_GET_FILTER_CRITERIA:
$aclRoleId = ApiController::getBareId($from, 'defaultAclRole');
$team = new Team();
$envTeam = new TeamEnvs();
return [AbstractEntity::STMT_FROM => "\n JOIN {$team->table('t')} ON {$team->columnId('t')} = {$envTeam->columnTeamId()}\n AND {$team->columnAccountRoleId('t')} = " . $team->qstr('accountRoleId', $aclRoleId) . "\n "];
}
}