You are here

party_from_user.form_entity.inc in Flexiform 7

Contains class for a basic entity getter.

File

includes/form_entity/party_from_user.form_entity.inc
View source
<?php

/**
 * @file
 *  Contains class for a basic entity getter.
 */

/**
 * Form entity to get the party from a user.
 */
class FlexiformFormEntityPartyFromUser extends FlexiformFormEntityBase {

  /**
   * {@inheritdoc}
   */
  public function getEntity() {
    parent::getEntity();
    $settings = $this->settings;

    // Get the party entity.
    $user = $this
      ->getParam('user');
    if ($user) {
      return party_user_get_party($user);
    }
    return FALSE;
  }

}

Classes

Namesort descending Description
FlexiformFormEntityPartyFromUser Form entity to get the party from a user.