original_string: protected function submitEditCollection()
      {
          if ($this->isPosted('delete')) {
              $this->deleteCollection();
          } else if ($this->isPosted('save') && $this->validateEditCollection()) {
              if (isset($this->data_collection['collection_id'])) {
                  $this->updateCollection();
              } else {
                  $this->addCollection();
              }
          }
      }
code: protected function submitEditCollection()
      {
          if ($this->isPosted('delete')) {
              $this->deleteCollection();
          } else if ($this->isPosted('save') && $this->validateEditCollection()) {
              if (isset($this->data_collection['collection_id'])) {
                  $this->updateCollection();
              } else {
                  $this->addCollection();
              }
          }
      }
code_tokens: protected function submitEditCollection ( ) { if ( $ this -> isPosted ( 'delete' ) ) { $ this -> deleteCollection ( ) ; } else if ( $ this -> isPosted ( 'save' ) && $ this -> validateEditCollection ( ) ) { if ( isset ( $ this -> data_collection [ 'collection_id' ] ) ) { $ this -> updateCollection ( ) ; } else { $ this -> addCollection ( ) ; } } }
docstring: Saves an array of submitted collection data
docstring_tokens: Saves an array of submitted collection data