Stud.IP  4.2 Revision
Element Class Reference
Inheritance diagram for Element:
Inheritance graph
Collaboration diagram for Element:
Collaboration graph

Public Member Functions

 hasAction ($action)
 
 getActions (Range $range, $scope)
 
 executeAction ($action, array $parameters, $admin_mode=false)
 
 equals ($other)
 
 store ()
 
- 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 ()
 

Protected Member Functions

 getTemplateName ()
 
 getTemplateLayout ()
 
 getTemplateVariables (array $variables=[])
 
- 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)
 
 registerCallback ($types, $cb)
 
 unregisterCallback ($types, $cb)
 
 cbAutoIncrementColumn ($type)
 
 cbAutoKeyCreation ()
 
 cbNotificationMapper ($cb_type)
 
 cbAfterInitialize ($cb_type)
 
 setSerializedValue ($field, $value)
 
 setI18nValue ($field, $value)
 
 cbI18N ($type)
 

Static Protected Member Functions

static configure ($config=[])
 
- Static Protected Member Functions inherited from SimpleORMap
static configure ($config=array())
 
static config ($key)
 

Additional Inherited Members

- Static Public Member Functions inherited from SimpleORMap
static tableScheme ($db_table)
 
static expireTableScheme ()
 
static find ($id)
 
static exists ($id)
 
static countBySql ($sql=1, $params=array())
 
static create ($data)
 
static build ($data, $is_new=true)
 
static buildExisting ($data)
 
static import ($data)
 
static findBySQL ($sql, $params=array())
 
static findOneBySQL ($where, $params=array())
 
static findThru ($foreign_key_value, $options)
 
static findEachBySQL ($callable, $sql, $params=array())
 
static findMany ($pks=array(), $order='', $order_params=array())
 
static findEachMany ($callable, $pks=array(), $order='', $order_params=array())
 
static findAndMapBySQL ($callable, $where, $params=array())
 
static findAndMapMany ($callable, $pks=array(), $order='', $order_params=array())
 
static deleteBySQL ($where, $params=array())
 
static toObject ($id_or_object)
 
static __callStatic ($name, $arguments)
 
- Static Public Attributes inherited from SimpleORMap
static $schemes = null
 
- Protected Attributes inherited from SimpleORMap
 $content = array()
 
 $content_db = array()
 
 $is_new = true
 
 $is_deleted = false
 
 $db_table = ''
 
 $db_fields = null
 
 $pk = null
 
 $default_values = array()
 
 $serialized_fields = array()
 
 $alias_fields = array()
 
 $i18n_fields = array()
 
 $additional_fields = array()
 
 $relations = array()
 
 $has_many = array()
 
 $has_one = array()
 
 $belongs_to = array()
 
 $has_and_belongs_to_many = array()
 
 $registered_callbacks = array()
 
 $known_slots = array()
 
 $notification_map = array()
 
 $additional_data = array()
 
 $getter_setter_map = array()
 
- Static Protected Attributes inherited from SimpleORMap
static $config = array()
 
static $reserved_slots = array('value','newid','iterator','tablemetadata', 'relationvalue','wherequery','relationoptions','data','new','id')
 

Detailed Description

This model represents a widget element that is positioned in a container and contains a widget plus additional settings/options.

Author
Jan-Hendrik Willms tleil.nosp@m.ax+s.nosp@m.tudip.nosp@m.@gma.nosp@m.il.co.nosp@m.m GPL2 or any later version
Since
Stud.IP 4.1

Member Function Documentation

◆ configure()

static configure (   $config = [])
staticprotected

Configures the model.

Parameters
array$configConfiguration array

◆ equals()

equals (   $other)

Returns whether this element is equal to another element. Two elements are equal if all of the following conditions match:

  • Same widget (by id/type)
  • Same width and height
  • Same options/settings
Parameters
Element$otherElement to test equality against
Returns
bool

Implements Comparable.

◆ executeAction()

executeAction (   $action,
array  $parameters,
  $admin_mode = false 
)

Executes an action on this element/widget. Since the execution is always invoked by a REST API call, the method is given the routemap that invoked the action call.

Parameters
string$actionAction to execute
array$parametersParameters to call the action method with
mixedResult of the action call

◆ getActions()

getActions ( Range  $range,
  $scope 
)

Returns a list of actions that the element/widget supports. Each action is defined by a label and a callback and may have additional attributes for the html representation of the action.

Returns
array of WidgetAction
Here is the call graph for this function:

◆ getTemplateLayout()

getTemplateLayout ( )
protected

Returns the layout for this element's template.

Returns
Flexi_Template
Here is the call graph for this function:

◆ getTemplateName()

getTemplateName ( )
protected

Returns the template name for this element.

Returns
string

◆ getTemplateVariables()

getTemplateVariables ( array  $variables = [])
protected

Returns neccessary variables to render the element template.

Parameters
array$variablesOptional additional variables
Returns
array of variables
Here is the call graph for this function:

◆ hasAction()

hasAction (   $action)

Returns whether this element/widget supports the requested action.

Parameters
String$actionRequested action
Returns
bool

◆ store()

store ( )

Stores this element. If the element was actually stored, store the connected container as well. This is neccessary to correctly adjust the parent id of the conainer.

Returns
int number of changed rows
Here is the caller graph for this function:

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