original_string: public function generateActions(array $actions): Editbox
      {
          foreach ($actions as $action) {
  
              $action_object = new Action();
  
              if (empty($action['type'])) {
                  $action['type'] = 'context';
              }
  
              $action_object->setType($action['type']);
  
              if (! empty($action['text'])) {
                  $action_object->setText($action['text']);
              }
  
              if (! empty($action['href'])) {
                  $action_object->setHref($action['href']);
              }
  
              if (isset($action['ajax'])) {
                  $action_object->setAjax($action['ajax']);
              }
  
              if (! empty($action['icon'])) {
                  $action_object->setIcon($action['icon']);
              }
  
              if (! empty($action['confirm'])) {
                  $action_object->setConfirm($action['confirm']);
              }
  
              $this->addAction($action_object);
          }
  
          return $this;
      }
code: public function generateActions(array $actions): Editbox
      {
          foreach ($actions as $action) {
  
              $action_object = new Action();
  
              if (empty($action['type'])) {
                  $action['type'] = 'context';
              }
  
              $action_object->setType($action['type']);
  
              if (! empty($action['text'])) {
                  $action_object->setText($action['text']);
              }
  
              if (! empty($action['href'])) {
                  $action_object->setHref($action['href']);
              }
  
              if (isset($action['ajax'])) {
                  $action_object->setAjax($action['ajax']);
              }
  
              if (! empty($action['icon'])) {
                  $action_object->setIcon($action['icon']);
              }
  
              if (! empty($action['confirm'])) {
                  $action_object->setConfirm($action['confirm']);
              }
  
              $this->addAction($action_object);
          }
  
          return $this;
      }
code_tokens: public function generateActions ( array $ actions ) : Editbox { foreach ( $ actions as $ action ) { $ action_object = new Action ( ) ; if ( empty ( $ action [ 'type' ] ) ) { $ action [ 'type' ] = 'context' ; } $ action_object -> setType ( $ action [ 'type' ] ) ; if ( ! empty ( $ action [ 'text' ] ) ) { $ action_object -> setText ( $ action [ 'text' ] ) ; } if ( ! empty ( $ action [ 'href' ] ) ) { $ action_object -> setHref ( $ action [ 'href' ] ) ; } if ( isset ( $ action [ 'ajax' ] ) ) { $ action_object -> setAjax ( $ action [ 'ajax' ] ) ; } if ( ! empty ( $ action [ 'icon' ] ) ) { $ action_object -> setIcon ( $ action [ 'icon' ] ) ; } if ( ! empty ( $ action [ 'confirm' ] ) ) { $ action_object -> setConfirm ( $ action [ 'confirm' ] ) ; } $ this -> addAction ( $ action_object ) ; } return $ this ; }
docstring: Generate actions from an array of action definitions
  
  @param array $actions
  
  @return Editbox
docstring_tokens: Generate actions from an array of action definitions