1

I have a button in a dynamic setting array like this

$this->addColumn(
    'col_2',
    [
        'label' => __('download'), 
         'renderer'  => $this->getInsta(),
    ]
);

How can I call the function from the controller by clicking this button in admin panel ??

enter image description here

I want add controller function to butto edit in action

4
  • can you share screenshot of what you're expecting to do?
    – Mohit Rane
    Commented Jul 10, 2019 at 5:08
  • ok i shared, update question
    – Tomalo
    Commented Jul 10, 2019 at 6:03
  • where is your button?
    – Mohit Rane
    Commented Jul 10, 2019 at 6:05
  • Admin panel ->stores -> Configuration -> catalog -> Catalog -> i have my custom tab
    – Tomalo
    Commented Jul 10, 2019 at 6:52

1 Answer 1

0

Try by this way:

$link= $this->getUrl('module/controller/method');
$this->addColumn(
    'action',
    array(
    'header'   => __('Actions'),
    'sortable' => false,
    'filter'   => false,
    'type'     => 'action',
    'actions'  => array(
        array(
            'url'     => $link,
            'caption' => __('Terminate Session'),
            'confirm' => __('Are you sure?'),
        ),
    ),
    )
);
1
  • no generate buton
    – Tomalo
    Commented Jul 10, 2019 at 12:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.