Stud.IP  4.0
 All Data Structures Namespaces Files Functions Variables Groups
DataField Class Reference
Inheritance diagram for DataField:
SimpleORMap PrivacyObject

Public Member Functions

 __call ($method, array $arguments)
 
 setType ($type)
 
 accessAllowed ($perm=null, $watcher= '', $user= '')
 
 editAllowed ($userPerms)
 
 count ()
 
- 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 ()
 

Static Public Member Functions

static static getDataFields ($objectType=null, $objectClass= '', $includeNullClass=false)
 
static getDataClass ()
 
static permMask ($perm)
 
static getReadableUserClass ($class)
 
static exportUserData (StoredUserData $storage)
 
- 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 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)
 

Static Protected Attributes

static $permission_masks
 
- 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
 

Additional Inherited Members

- Data Fields inherited from SimpleORMap
const ID_SEPARATOR = '_'
 
- Static Public Attributes inherited from SimpleORMap
static $schemes = 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 SimpleORMap
 $content = []
 
 $content_db = []
 
 $is_new = true
 
 $is_deleted = false
 
 $relations = []
 
 $additional_data = []
 

Member Function Documentation

__call (   $method,
array  $arguments 
)

Legacy handler for access via [get|set]VariableName().

Parameters
String$methodCalled method
Array$argumentsGiven arguments
Returns
mixed Return value of the getter/setter
Exceptions
BadMethodCallExceptionwhen the method does not match a valid pattern
accessAllowed (   $perm = null,
  $watcher = '',
  $user = '' 
)

Returns whether a user may access this datafield.

Parameters
String$permPermission of the user, optional defaults to current user
String$watcherCurrent user
String$userAssociated user of the datafield
Returns
bool indicating whether the datafield may be accessed.
static configure (   $config = [])
staticprotected

Configures this model.

Parameters
Array$configConfiguration array
count ( )

Specialized count method that returns the number of concrete entries.

Returns
int number of entries
editAllowed (   $userPerms)

Returns whether a user may edit this datafield.

Parameters
String$userPermsPermissions of the user
Returns
bool indicating whether the datafield may be edited
static exportUserData ( StoredUserData  $storage)
static

Export available data of a given user into a storage object (an instance of the StoredUserData class) for that user.

Parameters
StoredUserData$storageobject to store data into

Implements PrivacyObject.

static getDataClass ( )
static

Returns a list of all datatype classes with an id as key and a name as value.

Returns
array list of all datatype classes
static static getDataFields (   $objectType = null,
  $objectClass = '',
  $includeNullClass = false 
)
static

Returns a collection of datafields filtered by objectType, objectClass and/or unassigned objectClasses.

Parameters
mixed$objectTypeObject type
String$objectClassObject class
bool$includeNullClassShould the object class "null" be included
Returns
array of DataField instances
static getReadableUserClass (   $class)
static

liefert String zu gegebener user_class-Maske

Parameters
integer$classthe user class mask
Returns
string a string consisting of a comma separated list of permissions
static permMask (   $perm)
static

Return the mask for the given permission

Parameters
string$permthe name of the permission
Returns
integer the mask for the permission
setType (   $type)

Sets the type and adjusts type param as well.

Parameters
String$typeType of this datafield

Field Documentation

$permission_masks
staticprotected
Initial value:
= [
'user' => 1

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