Commit 704b9849 authored by Bart Vanderstukken's avatar Bart Vanderstukken
Browse files

Allows other modules to alter the created entity

parent 4146d837
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -49,6 +49,8 @@ function paragraph_panes_admin_info($subtype, $conf, $contexts) {
 * using the pane configuration and render the entity view.
 */
function paragraph_panes_render($subtype, $conf, $panel_args, $context = NULL) {
  $incoming_args = get_defined_vars();

  // Create the entity.
  $entity = entity_create('paragraphs_item', array(
    'field_name' => NULL,
@@ -77,6 +79,9 @@ function paragraph_panes_render($subtype, $conf, $panel_args, $context = NULL) {
    }
  }

  // Allow other modules to alter the created entity based on the pane's info.
  drupal_alter('paragraph_panes_prerender_pane_entity', $entity, $incoming_args);

  // Add the rendered entity to the block's content.
  $block = new stdClass();
  $block->title = '';
+1 −1

File changed.

Contains only whitespace changes.