◆ __construct()
      
        
          | __construct  | 
          ( | 
          DataField  | 
          $datafield = null,  | 
        
        
           | 
           | 
            | 
          $rangeID = '',  | 
        
        
           | 
           | 
            | 
          $value = null  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Constructs this datafield
- Parameters
 - 
  
    | DataField | $datafield | Underlying model  | 
    | mixed | $range_id | Range id (or array with range id and secondary range id)  | 
    | mixed | $value | Value  | 
  
   
 
 
◆ createDataFieldEntry()
  
  
      
        
          | static createDataFieldEntry  | 
          ( | 
          DataField  | 
          $datafield,  | 
         
        
           | 
           | 
            | 
          $rangeID = '',  | 
         
        
           | 
           | 
            | 
          $value = null  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
static   | 
  
 
Factory method that returns the appropriate datafield object for the given parameters.
- Parameters
 - 
  
    | DataField | $datafield | Underlying structure  | 
    | String | $rangeID | Range id  | 
    | mixed | $value | Value of the entry  | 
  
   
- Returns
 - DataFieldEntry instance of appropriate type 
 
 
 
◆ getDataFieldEntries()
  
  
      
        
          | static getDataFieldEntries  | 
          ( | 
            | 
          $range_id,  | 
         
        
           | 
           | 
            | 
          $object_type = '',  | 
         
        
           | 
           | 
            | 
          $object_class_hint = ''  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
static   | 
  
 
Enter description here...
- Parameters
 - 
  
    | unknown_type | $range_id |  | 
    | unknown_type | $object_type |  | 
    | unknown_type | $object_class_hint |  | 
  
   
- Returns
 - unknown 
 
 
 
◆ getDescription()
Returns the description of this datafield
- Returns
 - String containing the description 
 
 
 
◆ getDisplayValue()
      
        
          | getDisplayValue  | 
          ( | 
            | 
          $entities = true | ) | 
           | 
        
      
 
Returns the display/rendered value of this datafield
- Parameters
 - 
  
    | bool | $entities | Should html entities be encoded (defaults to true)  | 
  
   
- Returns
 - String containg the rendered value 
 
 
 
◆ getHTML()
      
        
          | getHTML  | 
          ( | 
            | 
          $name = '',  | 
        
        
           | 
           | 
            | 
          $variables = []  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Returns the according input elements as html for this datafield
- Parameters
 - 
  
    | String | $name | Name prefix of the associated input  | 
    | Array | $variables | Additional variables  | 
  
   
- Returns
 - String containing the required html 
 
 
 
◆ getId()
Returns the id of the datafield
- Returns
 - String containing the id 
 
 
 
◆ getName()
Returns the name of the datafield
- Returns
 - String containing the name 
 
 
 
◆ getPermsDescription()
Returns a human readable string describing the view permissions
- Returns
 - String containing the descriptons of the view permissions 
 
 
 
◆ getRangeID()
Returns the range id
- Returns
 - String containing the range id 
 
 
 
◆ getSecondRangeID()
Returns the secondary range id
- Returns
 - String containing the secondary range id 
 
 
 
◆ getSupportedTypes()
  
  
      
        
          | static getSupportedTypes  | 
          ( | 
            | 
          $object_type = null | ) | 
           | 
         
       
   | 
  
static   | 
  
 
Returns all supported datafield types.
- Parameters
 - 
  
    | string | Object type of the datafield.  | 
  
   
- Returns
 - array of supported types 
 
 
 
◆ getType()
Returns the type of this datafield
- Returns
 - string type of entry 
 
 
 
◆ getValue()
Returns the value of the datafield
- Returns
 - mixed containing the value 
 
 
 
◆ isEditable()
      
        
          | isEditable  | 
          ( | 
            | 
          $perms = null | ) | 
           | 
        
      
 
Returns whether the datafield is editable for the current user
- Parameters
 - 
  
    | mixed | $perms | Perms to test against (optional, defaults to logged in user's perms)  | 
  
   
- Returns
 - boolean indicating whether the datafield is editable 
 
 
 
◆ isEmpty()
Checks if datafield is empty (was not set)
- Returns
 - bool true if empty, else false 
 
 
 
◆ isRequired()
Returns whether this datafield is required
- Returns
 - bool indicating whether the datafield is required or not 
 
 
 
◆ isValid()
Returns whether the datafield contents are valid
- Returns
 - boolean indicating whether the datafield contents are valid 
 
 
 
◆ isVisible()
      
        
          | isVisible  | 
          ( | 
            | 
          $perm = null,  | 
        
        
           | 
           | 
            | 
          $test_ownership = true  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Returns whether the datafield is visible for the current user
- Parameters
 - 
  
    | String | $perm | Permissions to test against (optional, default to the current user's permissions)  | 
    | bool | $test_ownership | Defines whether the ownership of the field should be taken into account; a field may be invisible for a user according to the permissions but since the datafield belongs to the user, it is visible.  | 
  
   
- Returns
 - boolean indicating whether the datafield is visible 
 
 
 
◆ numberOfHTMLFields()
Returns the number of html fields this datafield uses for input.
- Returns
 - int representing the number of html fields 
 
 
 
◆ prettyPrintViewPerms()
Generates a full status description depending on the the perms
- Returns
 - string 
 
 
 
◆ removeAll()
  
  
      
        
          | static removeAll  | 
          ( | 
            | 
          $range_id | ) | 
           | 
         
       
   | 
  
static   | 
  
 
Removes all datafields from a given range_id (and secondary range id if passed as array)
- Parameters
 - 
  
    | mixed | $range_id | Range id (or array with range id and secondary range id)  | 
  
   
- Returns
 - int representing the number of deleted entries 
 
 
 
◆ setContentLanguage()
      
        
          | setContentLanguage  | 
          ( | 
            | 
          $language | ) | 
           | 
        
      
 
Sets the prefered content language if this is an i18n datafield.
- Parameters
 - 
  
    | string | $language | The prefered display language  | 
  
   
 
 
◆ setRangeID()
Sets the range id
- Parameters
 - 
  
  
 
 
 
◆ setSecondRangeID()
      
        
          | setSecondRangeID  | 
          ( | 
            | 
          $sec_range_id | ) | 
           | 
        
      
 
Sets the secondary range id
- Parameters
 - 
  
    | String | $sec_range_id | Secondary range id  | 
  
   
 
 
◆ setValue()
Sets the value
- Parameters
 - 
  
  
 
 
 
◆ setValueFromSubmit()
      
        
          | setValueFromSubmit  | 
          ( | 
            | 
          $submitted_value | ) | 
           | 
        
      
 
Sets the value from a post request
- Parameters
 - 
  
    | mixed | $submitted_value | The value from request  | 
  
   
 
 
◆ store()
Stores this datafield entry
- Returns
 - int representing the number of changed entries 
 
 
 
◆ $language
◆ $model
◆ $rangeID
◆ $supported_types
Initial value:= [
        'bool',
        'textline',
        'textlinei18n',
        'textarea',
        'textareai18n',
        'textmarkup',
        'textmarkupi18n',
        'selectbox',
        'selectboxmultiple',
        'date',
        'time',
        'email',
        'phone',
        'radio',
        'combo',
        'link',
    ]
 
 
 
◆ $value
The documentation for this class was generated from the following file: