daily pastebin goal
53%
SHARE
TWEET

Untitled

a guest Jul 18th, 2018 60 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. use MagentoUiComponentListingColumnsColumn;
  2.  
  3. class TestActions extends Column {
  4.     public function prepareDataSource(array $dataSource) {
  5.         if (isset($dataSource['data']['items'])) {
  6.             foreach ($dataSource['data']['items'] as &$item) {
  7.                 $item[$this->getData('name')] = [
  8.                     'test3' => [
  9.                         'label' => __('Test'),
  10.                         'callback' => [
  11.                             [
  12.                                 'provider' => 'cms_page_listing.cms_page_listing',
  13.                                 'target' => 'set',
  14.                                 'params' => [
  15.                                     'test',
  16.                                     'value'
  17.                                 ]
  18.                             ]
  19.                         ]
  20.                     ]
  21.                 ];
  22.             }
  23.         }
  24.  
  25.         return $dataSource;
  26.     }
  27. }
  28.    
  29. require('uiRegistry').get('cms_page_listing.cms_page_listing').set('test','value');
  30.    
  31. require('uiRegistry').get('cms_page_listing.cms_page_listing').set(['test','value']);
  32.    
  33. TypeError: path.split is not a function
  34.    
  35. [
  36.     'targetName' => 'cms_page_listing.cms_page_listing',
  37.     'actionName' => 'set',
  38.     'params' => [
  39.         'test',
  40.         'value'
  41.     ]
  42. ]
  43.    
  44. tmpCallback = {
  45.                 action: registry.async(cb.provider),
  46.                 args: _.compact([cb.target, cb.params])
  47.             };
  48.             callbacks.push(tmpCallback);
  49.    
  50. callbacks.push({
  51.                 action: registry.async(action.targetName),
  52.                 args: _.union([action.actionName], action.params)
  53.             });
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top