Enable the option for edit & add button target new window

Created on 1 April 2021, over 3 years ago
Updated 8 July 2024, 5 months ago

Problem/Motivation

Entity Connect current feature only allow the users to enable or disable the Edit Content or Add Content.
No Options, if user would like to create a new content or edit existing content in new tab,

Proposed resolution

// Build the button element.
$element[$button_name] = [
   '#type' => 'entityconnect_submit',
   '#value' => $this->t('Edit content'),
   '#name' => $button_name,
   '#prefix' => "<div class = 'entityconnect-edit $classes'>",
   '#suffix' => '</div>',
   '#key' => $key, 
   '#field' => $this->fieldDefinition->getName(),  
   '#entity_type_target' => $this->entityType, 
   '#acceptable_types' => $this->acceptableTypes,
   '#add_child' => FALSE,
   '#weight' => 1,
   '#attributes' => array('onclick' => 'this.form.target="_blank";return true;'),
];       
Feature request
Status

Closed: works as designed

Component

Code

Created by

🇮🇳India muthuraman-s

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024