You are here

function photos_node_builder in Album Photos 6.0.x

Same name and namespace in other branches
  1. 8.5 photos.module \photos_node_builder()
  2. 8.4 photos.module \photos_node_builder()

Entity form builder to add the album information to the node.

@todo Remove this in favor of an entity field.

1 string reference to 'photos_node_builder'
photos_form_node_form_alter in ./photos.module
Implements hook_form_BASE_FORM_ID_alter().

File

./photos.module, line 428
Implementation of photos.module.

Code

function photos_node_builder($entity_type, NodeInterface $entity, &$form, FormStateInterface $form_state) {
  if (!$form_state
    ->isValueEmpty('album')) {
    $entity->album = $form_state
      ->getValue('album');
  }
}