Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Activate.php
Go to the documentation of this file.
1 <?php
9 
13 
14 class Activate extends Link
15 {
19  public function getCaption()
20  {
21  return $this->_row->getStatus() != Integration::STATUS_ACTIVE ? __('Activate') : __('Reauthorize');
22  }
23 
28  protected function _getUrl(DataObject $row)
29  {
30  return 'javascript:void(0);';
31  }
32 
36  protected function _getAttributes()
37  {
38  return array_merge(parent::_getAttributes(), ['onclick' => 'integration.popup.show(this);']);
39  }
40 
44  protected function _getDataAttributes()
45  {
46  return [
47  'row-id' => $this->_row->getId(),
48  'row-dialog' => 'permissions',
49  'row-is-reauthorize' => $this->_row->getStatus() == Integration::STATUS_INACTIVE ? '0' : '1',
50  'row-is-token-exchange' => $this->_row->getEndpoint() && $this->_row->getIdentityLinkUrl() ? '1' : '0'
51  ];
52  }
53 }
__()
Definition: __.php:13