original_string: protected function setDataEditImageStyle()
      {
          $actions = $this->getData('imagestyle.actions');
  
          if (!$this->isError()) {
              gplcart_array_sort($actions);
          }
  
          $modified = array();
          foreach ($actions as $action_id => $info) {
  
              if (is_string($info)) {
                  $modified[] = $info;
                  continue;
              }
  
              $action = $action_id;
  
              if (!empty($info['value'])) {
                  $action .= ' ' . implode(',', $info['value']);
              }
  
              $modified[] = $action;
          }
  
          $this->setData('imagestyle.actions', implode(PHP_EOL, $modified));
      }
code: protected function setDataEditImageStyle()
      {
          $actions = $this->getData('imagestyle.actions');
  
          if (!$this->isError()) {
              gplcart_array_sort($actions);
          }
  
          $modified = array();
          foreach ($actions as $action_id => $info) {
  
              if (is_string($info)) {
                  $modified[] = $info;
                  continue;
              }
  
              $action = $action_id;
  
              if (!empty($info['value'])) {
                  $action .= ' ' . implode(',', $info['value']);
              }
  
              $modified[] = $action;
          }
  
          $this->setData('imagestyle.actions', implode(PHP_EOL, $modified));
      }
code_tokens: protected function setDataEditImageStyle ( ) { $ actions = $ this -> getData ( 'imagestyle.actions' ) ; if ( ! $ this -> isError ( ) ) { gplcart_array_sort ( $ actions ) ; } $ modified = array ( ) ; foreach ( $ actions as $ action_id => $ info ) { if ( is_string ( $ info ) ) { $ modified [ ] = $ info ; continue ; } $ action = $ action_id ; if ( ! empty ( $ info [ 'value' ] ) ) { $ action .= ' ' . implode ( ',' , $ info [ 'value' ] ) ; } $ modified [ ] = $ action ; } $ this -> setData ( 'imagestyle.actions' , implode ( PHP_EOL , $ modified ) ) ; }
docstring: Sets template data on the edit image style page
docstring_tokens: Sets template data on the edit image style page