Stud.IP  4.0
 All Data Structures Namespaces Files Functions Variables Groups
MvvContact Class Reference
Inheritance diagram for MvvContact:
ModuleManagementModel SimpleORMap ModuleManagementInterface

Public Member Functions

 getDisplayName ($options=null)
 
 getContactName ()
 
 addRange ($range_id, $range_type, $contact_type, $category)
 
 deleteRange ($range)
 
 getStatusName ()
 
- Public Member Functions inherited from ModuleManagementModel
 verifyPermission ($user_id=null)
 
 store ()
 
 validate ()
 
 delete ()
 
 setNewId ()
 
 getDisplayName ($options=self::DISPLAY_DEFAULT)
 
 getAvailableTranslations ()
 
 getStatus ()
 
 hasPublicStatus ($filter=null)
 
 getResponsibleInstitutes ()
 
 getVariant ()
 
- Public Member Functions inherited from SimpleORMap
 __construct ($id=null)
 
 __clone ()
 
 getRelationOptions ($relation)
 
 getTableMetadata ()
 
 hasAutoIncrementColumn ()
 
 setId ($id)
 
 getId ()
 
 getNewId ()
 
 toArray ($only_these_fields=null)
 
 toRawArray ($only_these_fields=null)
 
 toArrayRecursive ($only_these_fields=null)
 
 getValue ($field)
 
 getRelationValue ($relation, $field)
 
 getDefaultValue ($field)
 
 setValue ($field, $value)
 
 __get ($field)
 
 __set ($field, $value)
 
 __isset ($field)
 
 offsetExists ($offset)
 
 offsetGet ($offset)
 
 offsetSet ($offset, $value)
 
 offsetUnset ($offset)
 
 getIterator ()
 
 count ()
 
 isField ($field)
 
 isAdditionalField ($field)
 
 isAliasField ($field)
 
 isI18nField ($field)
 
 setData ($data, $reset=false)
 
 isNew ()
 
 isDeleted ()
 
 setNew ($is_new)
 
 getWhereQuery ()
 
 restore ()
 
 store ()
 
 triggerChdate ()
 
 delete ()
 
 isDirty ()
 
 isFieldDirty ($field)
 
 revertValue ($field)
 
 getPristineValue ($field)
 
 initRelation ($relation)
 
 resetRelation ($relation)
 
 cleanup ()
 
- Public Member Functions inherited from ModuleManagementInterface
 __construct ($id=null)
 

Static Public Member Functions

static getAllEnriched ($sortby= 'chdate', $order= 'DESC', $row_count=null, $offset=null, $filter=null)
 
static getIdsFiltered ($filter, $refresh=true)
 
static getAllRelations ($contact_ids=array())
 
static getCount ($filter=null)
 
static findBySearchTerm ($term, $filter=null)
 
static getAllAssignedInstitutes ($sortby= 'name', $order= 'ASC', $filter=null, $row_count=null, $offset=null)
 
static getStatusNames ()
 
- Static Public Member Functions inherited from ModuleManagementModel
static findBySearchTerm ($search_term, $filter=null)
 
static getAll ()
 
static get ($id=null)
 
static getEnriched ($id)
 
static getEnrichedByQuery ($query=null, $params=[], $row_count=null, $offset=null)
 
static getClassDisplayName ($long=false)
 
static getFilterSql ($filter, $where=false, $or_sql=null)
 
static getContentArray (SimpleORMap $sorm, $to_utf8=true)
 
static getCount ($filter=null)
 
static getCountBySql ($sql, $filter=null)
 
static setLanguage ($language)
 
static setContentLanguage ($language)
 
static getLanguage () = htmlReady($modul['name'])
 
static getLocaleOrdinalNumberSuffix ($num)
 
static getPublicStatus ($class_name=null)
 
static findCached ($id, $index=null)
 
static clearCache ($index=null)
 
- Static Public Member Functions inherited from SimpleORMap
static tableScheme ($db_table)
 
static expireTableScheme ()
 
static exists ($id)
 
static countBySql ($sql= '1', $params=[])
 
static create ($data)
 
static buildExisting ($data)
 
static import ($data)
 
static findBySQL ($sql, $params=[])
 
static findOneBySQL ($where, $params=[])
 
static findThru ($foreign_key_value, $options)
 
static findEachBySQL ($callable, $sql, $params=[])
 
static findMany ($pks=[], $order= '', $order_params=[])
 
static findEachMany ($callable, $pks=[], $order= '', $order_params=[])
 
static findAndMapBySQL ($callable, $where, $params=[])
 
static findAndMapMany ($callable, $pks=[], $order= '', $order_params=[])
 
static deleteBySQL ($where, $params=[])
 
static toObject ($id_or_object)
 
static __callStatic ($name, $arguments)
 

Static Protected Member Functions

static configure ($config=[])
 
- Static Protected Member Functions inherited from ModuleManagementModel
static configure ($config=[])
 
static checkSortFields ($sort, $standard_field=null, $additional_fields=[])
 
static createSortStatement ($sort, $order= 'ASC', $standard_field=null, $additional_fields=[])
 
static fromCache ($index, $id, Callable $finder)
 
- Static Protected Member Functions inherited from SimpleORMap
static db_table ()
 
static db_fields ()
 
static pk ()
 
static default_values ()
 
static serialized_fields ()
 
static alias_fields ()
 
static i18n_fields ()
 
static additional_fields ()
 
static has_many ()
 
static has_one ()
 
static belongs_to ()
 
static has_and_belongs_to_many ()
 
static registered_callbacks ()
 
static known_slots ()
 
static notification_map ()
 
static getter_setter_map ()
 
static configure ($config=[])
 
static config ($key)
 
static registerCallback ($types, $cb)
 
static unregisterCallback ($types, $cb)
 

Additional Inherited Members

- Data Fields inherited from ModuleManagementModel
const DISPLAY_DEFAULT = 1
 
const DISPLAY_SEMESTER = 2
 
const DISPLAY_CODE = 4
 
const DISPLAY_FACULTY = 8
 
const DISPLAY_FACH = 16
 
const DISPLAY_STGTEIL = 32
 
const DISPLAY_ABSCHLUSS = 64
 
const DISPLAY_KATEGORIE = 128
 
 $object_real_name = ''
 
- Data Fields inherited from SimpleORMap
const ID_SEPARATOR = '_'
 
- Static Public Attributes inherited from SimpleORMap
static $schemes = null
 
- Protected Member Functions inherited from ModuleManagementModel
 logChanges ($action=null)
 
- Protected Member Functions inherited from SimpleORMap
 _getId ($field)
 
 _setId ($field, $value)
 
 _getAdditionalValueFromRelation ($field)
 
 _setAdditionalValueFromRelation ($field, $value)
 
 _getAdditionalValue ($field)
 
 _setAdditionalValue ($field, $value)
 
 parseRelationOptions ($type, $name, $options)
 
 storeRelations ($only_these=null)
 
 deleteRelations ()
 
 initializeContent ()
 
 applyCallbacks ($type)
 
 cbAutoIncrementColumn ($type)
 
 cbAutoKeyCreation ()
 
 cbNotificationMapper ($cb_type)
 
 cbAfterInitialize ($cb_type)
 
 setSerializedValue ($field, $value)
 
 setI18nValue ($field, $value)
 
- Protected Attributes inherited from ModuleManagementModel
 $is_dirty = false
 
- Protected Attributes inherited from SimpleORMap
 $content = []
 
 $content_db = []
 
 $is_new = true
 
 $is_deleted = false
 
 $relations = []
 
 $additional_data = []
 
- Static Protected Attributes inherited from ModuleManagementModel
static $filter_params = []
 
static $perm_object = null
 
static $object_cache = []
 
- Static Protected Attributes inherited from SimpleORMap
static $config = []
 
static $reserved_slots = ['value','newid','iterator','tablemetadata', 'relationvalue','wherequery','relationoptions','data','new','id']
 
static $performs_batch_operation = false
 

Member Function Documentation

addRange (   $range_id,
  $range_type,
  $contact_type,
  $category 
)

adds a new range to the contact.

Parameters
string$range_id
string$range_type
string$contact_type
string$category
Returns
boolean success of adding
static configure (   $config = [])
staticprotected
Parameters
array$config
deleteRange (   $range)

Removes a range from the contact.

Parameters
string$rangeThe range object (assignment of a contact to a mvv object)
Returns
boolean success of removing
static findBySearchTerm (   $term,
  $filter = null 
)
static

Find contacts by given search term. Used as search function in list view.

Parameters
type$termThe search term.
type$filterOptional filter parameters.
Returns
array An array of contacts ids.
static getAllAssignedInstitutes (   $sortby = 'name',
  $order = 'ASC',
  $filter = null,
  $row_count = null,
  $offset = null 
)
static

Returns all institutes assigned to contacts. Sorted and filtered by optional parameters.

Parameters
string$sortbyDB field to sort by.
string$orderASC or DESC
array$filterArray of filter.
Returns
array Array of found Fachbereiche.
static getAllEnriched (   $sortby = 'chdate',
  $order = 'DESC',
  $row_count = null,
  $offset = null,
  $filter = null 
)
static

Returns all or a specified (by row count and offset) number of contacts sorted and filtered by given parameters and enriched with some additional fields. This function is mainly used in the list view.

Parameters
string$sortbyField name to order by.
string$orderASC or DESC direction of order.
array$filterKey-value pairs of filed names and values to filter the result set.
int$row_countThe max number of objects to return.
int$offsetThe first object to return in a result set.
Returns
object A SimpleORMapCollection of Dokument objects.
static getAllRelations (   $contact_ids = array())
static

Returns all relations of the contacts specified by the given ids. The returned array is ordered by the types of the referenced objects.

Parameters
array$contact_idsIds of the contacts.
Returns
array References ordered by object types.
getContactName ( )

Returns the name of the contact based on contact type.

Returns
bool|string Returns false on failure, otherwise the name of contact.
static getCount (   $filter = null)
static

Returns the number of contacts comply with the given filter parameters.

Parameters
array$filterArray of filter parameters
See Also
ModuleManagementModel::getFilterSql()
Returns
int The number of contacts.
getDisplayName (   $options = null)

Returns the name of the object to display in a specific context..

Returns
string The name for
static getIdsFiltered (   $filter,
  $refresh = true 
)
static

Returns range_ids (ids of Modul/Studiengang) of assigned contacts.

array $ids The range_ids of assigned contacts after filtration.

Parameters
array$filterAn array with keys (table_name.column_name) and values (skalar or array) used in where clause.
boolean$refreshRefresh ids if true.
Returns
array An array with range_ids of assigned contacts.
getStatusName ( )

Returns the name of the status.

Returns
string The name of the status
static getStatusNames ( )
static

Return an associative array with all possible status names. The key is used by the field "status".

Returns
array Array with alle possible status names

The documentation for this class was generated from the following file: