Unverified Commit 5140fa15 authored by Daniel Sipos's avatar Daniel Sipos Committed by Daniel Sipos
Browse files

Issue #2866889 by dpi, mikejw, Upchuk, Brolad, joevagyok, sinn: WSD on workflow module states page

parent fc6e6c9d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -122,7 +122,7 @@ function entity_clone_entity_type_build(array &$entity_types) {
 * @see \Drupal\Core\Entity\EntityListBuilderInterface::getOperations()
 */
function entity_clone_entity_operation(EntityInterface $entity) {
  if ($entity->hasLinkTemplate('clone-form') && $entity->access('clone')) {
  if ($entity->hasLinkTemplate('clone-form') && $entity->access('clone') && !$entity->isNew()) {
    return [
      'clone' => [
        'title' => t('Clone'),
+1 −1
Original line number Diff line number Diff line
@@ -240,7 +240,7 @@ class EntityCloneForm extends FormBase {
   */
  protected function formSetRedirect(FormStateInterface $form_state, EntityInterface $entity) {
    if ($entity && $entity->hasLinkTemplate('canonical')) {
      $form_state->setRedirect($entity->toUrl()->getRouteName(), $entity->toUrl()->getRouteParameters());
      $form_state->setRedirect($entity->toUrl('canonical')->getRouteName(), $entity->toUrl('canonical')->getRouteParameters());
    }
    else {
      $form_state->setRedirect('<front>');