original_string: protected function addProductClassField()
      {
          $this->controlAccess('product_class_edit');
  
          foreach ((array) $this->getSubmitted('field_id', array()) as $field_id) {
  
              $field = array(
                  'field_id' => $field_id,
                  'product_class_id' => $this->data_product_class['product_class_id']
              );
  
              $this->product_class_field->add($field);
          }
  
          $url = "admin/content/product-class/field/{$this->data_product_class['product_class_id']}";
          $this->redirect($url, $this->text('Product class has been updated'), 'success');
      }
code: protected function addProductClassField()
      {
          $this->controlAccess('product_class_edit');
  
          foreach ((array) $this->getSubmitted('field_id', array()) as $field_id) {
  
              $field = array(
                  'field_id' => $field_id,
                  'product_class_id' => $this->data_product_class['product_class_id']
              );
  
              $this->product_class_field->add($field);
          }
  
          $url = "admin/content/product-class/field/{$this->data_product_class['product_class_id']}";
          $this->redirect($url, $this->text('Product class has been updated'), 'success');
      }
code_tokens: protected function addProductClassField ( ) { $ this -> controlAccess ( 'product_class_edit' ) ; foreach ( ( array ) $ this -> getSubmitted ( 'field_id' , array ( ) ) as $ field_id ) { $ field = array ( 'field_id' => $ field_id , 'product_class_id' => $ this -> data_product_class [ 'product_class_id' ] ) ; $ this -> product_class_field -> add ( $ field ) ; } $ url = "admin/content/product-class/field/{$this->data_product_class['product_class_id']}" ; $ this -> redirect ( $ url , $ this -> text ( 'Product class has been updated' ) , 'success' ) ; }
docstring: Adds product class fields
docstring_tokens: Adds product class fields