class FlexiformFormEntityCurrentUser in Flexiform 7
Simple form entity for the current user.
Note that if the user is logged out the function returns false.
Hierarchy
- class \FlexiformFormEntityBase implements FlexiformFormEntityInterface
 
Expanded class hierarchy of FlexiformFormEntityCurrentUser
1 string reference to 'FlexiformFormEntityCurrentUser'
File
- includes/
form_entity/ current_user.form_entity.inc, line 12  - Contains class for a basic entity getter.
 
View source
class FlexiformFormEntityCurrentUser extends FlexiformFormEntityBase {
  /**
   * {@inheritdoc}
   */
  public function getEntity() {
    global $user;
    parent::getEntity();
    if ($user->uid == 0) {
      return FALSE;
    }
    return user_load($user->uid);
  }
}Members
| 
            Name | 
                  Modifiers | Type | Description | Overrides | 
|---|---|---|---|---|
| 
            FlexiformFormEntityBase:: | 
                  public | property | The namespace of this entity. | |
| 
            FlexiformFormEntityBase:: | 
                  public | property | The type of this entity. | |
| 
            FlexiformFormEntityBase:: | 
                  public | property | Details of the getter. | |
| 
            FlexiformFormEntityBase:: | 
                  public | property | The Flexiform Entity Manager | |
| 
            FlexiformFormEntityBase:: | 
                  public | property | The settings for this entity on the flexiform. | |
| 
            FlexiformFormEntityBase:: | 
                  public | function | Check bundle. | |
| 
            FlexiformFormEntityBase:: | 
                  public | function | 
            Get the Configuration Form. Overrides FlexiformFormEntityInterface:: | 
                  3 | 
| 
            FlexiformFormEntityBase:: | 
                  public | function | 
            Submit the Configuration Form. Overrides FlexiformFormEntityInterface:: | 
                  |
| 
            FlexiformFormEntityBase:: | 
                  public | function | 
            Validate the configuration form. Overrides FlexiformFormEntityInterface:: | 
                  |
| 
            FlexiformFormEntityBase:: | 
                  public | function | Get a Parameter From the Entity Manager. | |
| 
            FlexiformFormEntityBase:: | 
                  public | function | Get a Parameter's entity settings from the Entity Manager. | |
| 
            FlexiformFormEntityBase:: | 
                  public | function | Get the entity type of a parameter. | |
| 
            FlexiformFormEntityBase:: | 
                  public | function | 
            Save the entity upon submission of the form. Overrides FlexiformFormEntityInterface:: | 
                  5 | 
| 
            FlexiformFormEntityBase:: | 
                  public | function | Construct a Flexiform Form Entity class. | |
| 
            FlexiformFormEntityCurrentUser:: | 
                  public | function | 
            Get the entity for the form. Overrides FlexiformFormEntityBase:: |