original_string: protected function addCollectionItem()
      {
          $this->controlAccess('collection_item_add');
  
          if ($this->collection_item->add($this->getSubmitted())) {
              $this->redirect('', $this->text('Collection item has been added'), 'success');
          }
  
          $this->redirect('', $this->text('Collection item has not been added'), 'warning');
      }
code: protected function addCollectionItem()
      {
          $this->controlAccess('collection_item_add');
  
          if ($this->collection_item->add($this->getSubmitted())) {
              $this->redirect('', $this->text('Collection item has been added'), 'success');
          }
  
          $this->redirect('', $this->text('Collection item has not been added'), 'warning');
      }
code_tokens: protected function addCollectionItem ( ) { $ this -> controlAccess ( 'collection_item_add' ) ; if ( $ this -> collection_item -> add ( $ this -> getSubmitted ( ) ) ) { $ this -> redirect ( '' , $ this -> text ( 'Collection item has been added' ) , 'success' ) ; } $ this -> redirect ( '' , $ this -> text ( 'Collection item has not been added' ) , 'warning' ) ; }
docstring: Adds a new collection item
docstring_tokens: Adds a new collection item