Skip to main content
deleted 58 characters in body
Source Link
leexonline
  • 866
  • 5
  • 10

To set the initial value:

$ewrapper->field_user_permission = array($user->uid);
$ewrapper->save();

To set or additional values:

$ewrapper->field_user_permission[] = $user->uid;
$ewrapper->save();

This method also works with wrapped multi value Entity Reference fields.

To set the initial value:

$ewrapper->field_user_permission = array($user->uid);
$ewrapper->save();

To set additional values:

$ewrapper->field_user_permission[] = $user->uid;
$ewrapper->save();

This method also works with wrapped multi value Entity Reference fields.

To set the initial value or additional values:

$ewrapper->field_user_permission[] = $user->uid;
$ewrapper->save();

This method also works with wrapped multi value Entity Reference fields.

deleted 58 characters in body
Source Link
leexonline
  • 866
  • 5
  • 10

To set the initial value:

$ewrapper->field_user_permission = array($user->uid);
$ewrapper->save();

To set additional values:

$ewrapper->field_user_permission[] = $user->uid;
$ewrapper->save();

Disclaimer: I've never used the references module but I useThis method also works with wrapped multi value Entity Reference and Entity Wrappers, so this answer is an assumptionfields.

To set the initial value:

$ewrapper->field_user_permission = array($user->uid);
$ewrapper->save();

To set additional values:

$ewrapper->field_user_permission[] = $user->uid;
$ewrapper->save();

Disclaimer: I've never used the references module but I use Entity Reference and Entity Wrappers, so this answer is an assumption.

To set the initial value:

$ewrapper->field_user_permission = array($user->uid);
$ewrapper->save();

To set additional values:

$ewrapper->field_user_permission[] = $user->uid;
$ewrapper->save();

This method also works with wrapped multi value Entity Reference fields.

Source Link
leexonline
  • 866
  • 5
  • 10

To set the initial value:

$ewrapper->field_user_permission = array($user->uid);
$ewrapper->save();

To set additional values:

$ewrapper->field_user_permission[] = $user->uid;
$ewrapper->save();

Disclaimer: I've never used the references module but I use Entity Reference and Entity Wrappers, so this answer is an assumption.