modules/Teams/TeamSetLink.php
\TeamSetLink
Package: SugarCRM
This class extends the Link object to implement custom handling for team sets behavior This is defined in include/SugarObjects/team_security/vardefs.php as: 'link_type' => 'TeamSetLink', 'link_file' => 'modules/Teams/TeamSetLink.php'
- Parent(s)
- \Link
Properties
$_bean_filter_field= ''''
inheritedInherited from:
\Link::$$_bean_filter_field
Default value
''
Details- Type
- n/a
- Inherited_from
- \Link::$$_bean_filter_field
$_bean_key_name= ''id''
inheritedInherited from:
\Link::$$_bean_key_name
Default value
'id'
Details- Type
- n/a
- Inherited_from
- \Link::$$_bean_key_name
$_bean_table_name= ''
inheritedInherited from:
\Link::$$_bean_table_name
Details
- Type
- n/a
- Inherited_from
- \Link::$$_bean_table_name
$_duplicate_key= ''
inheritedInherited from:
\Link::$$_duplicate_key
Details
- Type
- n/a
- Inherited_from
- \Link::$$_duplicate_key
$_duplicate_where= ''
inheritedInherited from:
\Link::$$_duplicate_where
Details
- Type
- n/a
- Inherited_from
- \Link::$$_duplicate_where
$_relationship= ''''
inheritedInherited from:
\Link::$$_relationship
Default value
''
Details- Type
- n/a
- Inherited_from
- \Link::$$_relationship
$_relationship_name= ''
inheritedInherited from:
\Link::$$_relationship_name
Details
- Type
- n/a
- Inherited_from
- \Link::$$_relationship_name
$_rhs_key_override= 'false'
inheritedInherited from:
\Link::$$_rhs_key_override
Default value
false
Details- Type
- n/a
- Inherited_from
- \Link::$$_rhs_key_override
$_swap_sides= 'false'
inheritedInherited from:
\Link::$$_swap_sides
Default value
false
Details- Type
- n/a
- Inherited_from
- \Link::$$_swap_sides
$add_distinct= 'false'
inheritedInherited from:
\Link::$$add_distinct
Default value
false
Details- Type
- n/a
- Inherited_from
- \Link::$$add_distinct
$ignore_role_filter= 'false'
inheritedInherited from:
\Link::$$ignore_role_filter
Default value
false
Details- Type
- n/a
- Inherited_from
- \Link::$$ignore_role_filter
$relationship_fields= 'array()'
inheritedInherited from:
\Link::$$relationship_fields
Default value
array()
Details- Type
- n/a
- Inherited_from
- \Link::$$relationship_fields
Methods
Link(
$_rel_name, $_bean, $fieldDef, $_table_name
=
'', $_key_name
=
''
)
:
void
inherited
Inherited from:
\Link::Link()
Parameters
Name | Type | Description |
---|---|---|
$_rel_name | ||
$_bean | ||
$fieldDef | ||
$_table_name | ||
$_key_name |
__construct(
$_rel_name, $_bean, $fieldDef, $_table_name
=
'', $_key_name
=
''
)
:
void
Parameters
Name | Type | Description |
---|---|---|
$_rel_name | ||
$_bean | ||
$fieldDef | ||
$_table_name | ||
$_key_name |
_add_deleted_clause(
$deleted
=
0, $add_and
=
'', $prefix
=
''
)
:
void
inherited
Inherited from:
\Link::_add_deleted_clause()
Parameters
Name | Type | Description |
---|---|---|
$deleted | ||
$add_and | ||
$prefix |
_add_many_to_many(
$add_values
)
:
void
inherited
Inherited from:
\Link::_add_many_to_many()
Parameters
Name | Type | Description |
---|---|---|
$add_values |
_add_many_to_one_bean_based(
$key
)
:
void
inherited
Inherited from:
\Link::_add_many_to_one_bean_based()
Parameters
Name | Type | Description |
---|---|---|
$key |
_add_one_to_many_table_based(
$key, $bean_is_lhs
)
:
void
inherited
Inherited from:
\Link::_add_one_to_many_table_based()
Parameters
Name | Type | Description |
---|---|---|
$key | ||
$bean_is_lhs |
_add_optional_where_clause(
$optional_array, $add_and
=
'', $prefix
=
''
)
:
void
inherited
Inherited from:
\Link::_add_optional_where_clause()
Parameters
Name | Type | Description |
---|---|---|
$optional_array | ||
$add_and | ||
$prefix |
_delete_row(
$table_name, $key
)
:
void
inherited
Inherited from:
\Link::_delete_row()
Parameters
Name | Type | Description |
---|---|---|
$table_name | ||
$key |
_get_alternate_key_fields(
$table_name
)
:
void
inherited
Inherited from:
\Link::_get_alternate_key_fields()
Parameters
Name | Type | Description |
---|---|---|
$table_name |
_get_link_table_definition(
$table_name, $def_name
)
:
void
inherited
Inherited from:
\Link::_get_link_table_definition()
Parameters
Name | Type | Description |
---|---|---|
$table_name | ||
$def_name |
_get_link_table_role_field(
$table_name
)
:
void
inherited
Inherited from:
\Link::_get_link_table_role_field()
Parameters
Name | Type | Description |
---|---|---|
$table_name |
_insert_row(
$value_array
)
:
void
inherited
Inherited from:
\Link::_insert_row()
Parameters
Name | Type | Description |
---|---|---|
$value_array |
_update_row(
$value_array, $table_name, $where
)
:
void
inherited
Inherited from:
\Link::_update_row()
Parameters
Name | Type | Description |
---|---|---|
$value_array | ||
$table_name | ||
$where |
add(
\unknown_type $rel_keys, \unknown_type $additional_values
=
array(), \unknown_type $save
=
true
)
:
void
Parameters
Details
Name | Type | Description |
---|---|---|
$rel_keys | \unknown_type | |
$additional_values | \unknown_type | |
$save | \unknown_type |
- Override
- add from Link.php If we have an array of team ids then append them, since that is in common with how we call add() on relationships
appendTeams(
\unknown_type $rel_keys, \unknown_type $additional_values
=
array(), \unknown_type $save
=
true
)
:
void
Append the given teams to the list of teams already on the bean
Parameters
Name | Type | Description |
---|---|---|
$rel_keys | \unknown_type | |
$additional_values | \unknown_type | |
$save | \unknown_type |
delete(
$module_id, $team_id
=
''
)
:
void
Parameters
Details
Name | Type | Description |
---|---|---|
$module_id | ||
$team_id |
- Override
- delete from Link.php if we do not have a related_id, we can assume we are operating on the related bean so we can just call remove, otherwise we will have to do something similar to what we do in the delete() method within Link.php and try to load the bean from the relationship table.
get(
$role
=
false
)
:
void
inherited
Inherited from:
\Link::get()
Parameters
Name | Type | Description |
---|---|---|
$role |
getBeans(
$template, $sort_array
=
array(), $begin_index
=
0, $end_index
=
-1, $deleted
=
0, $optional_where
=
""
)
:
void
inherited
Inherited from:
\Link::getBeans()
Parameters
Name | Type | Description |
---|---|---|
$template | ||
$sort_array | ||
$begin_index | ||
$end_index | ||
$deleted | ||
$optional_where |
getJoin(
$params, $return_array
=
false
)
:
void
inherited
Inherited from:
\Link::getJoin()
Parameters
Name | Type | Description |
---|---|---|
$params | ||
$return_array |
getQuery(
$return_as_array
=
false, $sort_array
=
array(), $deleted
=
0, $optional_where
=
"", $return_join
=
false, $bean_filter
=
"", $role
=
"", $for_subpanels
=
false
)
:
void
inherited
Inherited from:
\Link::getQuery()
Parameters
Name | Type | Description |
---|---|---|
$return_as_array | ||
$sort_array | ||
$deleted | ||
$optional_where | ||
$return_join | ||
$bean_filter | ||
$role | ||
$for_subpanels |
getRelatedField(
$name
)
:
void
inherited
Inherited from:
\Link::getRelatedField()
Parameters
Name | Type | Description |
---|---|---|
$name |
relationship_exists(
$table_name, $join_key_values
)
:
void
inherited
Inherited from:
\Link::relationship_exists()
Parameters
Name | Type | Description |
---|---|---|
$table_name | ||
$join_key_values |
remove(
\unknown_type $rel_keys, \unknown_type $additional_values
=
array(), \unknown_type $save
=
true
)
:
void
Remove the given teams from the bean
Parameters
Name | Type | Description |
---|---|---|
$rel_keys | \unknown_type | |
$additional_values | \unknown_type | |
$save | \unknown_type |
replace(
object $rel_keys, \unknown_type $additional_values
=
array(), \unknown_type $save
=
true
)
:
void
Replace whatever teams are on the bean with the teams given in the $rel_keys
Parameters
Name | Type | Description |
---|---|---|
$rel_keys | object | |
$additional_values | \unknown_type | |
$save | \unknown_type |
save(
$checkForUpdate
=
true, $usedDefaultTeam
=
false
)
:
void
Commit any unsaved changes to the database
Parameters
Name | Type | Description |
---|---|---|
$checkForUpdate | ||
$usedDefaultTeam |