Beispiel #1
0
 /**
  * @test
  */
 public function removeTagFromObjectStorageHoldingTags()
 {
     $tag = new Tx_Nxshowroom_Domain_Model_Tags();
     $localObjectStorage = new Tx_Extbase_Persistence_ObjectStorage();
     $localObjectStorage->attach($tag);
     $localObjectStorage->detach($tag);
     $this->fixture->addTag($tag);
     $this->fixture->removeTag($tag);
     $this->assertEquals($localObjectStorage, $this->fixture->getTags());
 }
 /**
  * action create
  *
  * @param $newResource
  * @param $type
  * @return void
  */
 public function createAction(Tx_Nxshowroom_Domain_Model_Resource $newResource, Tx_Nxshowroom_Domain_Model_Type $type)
 {
     $newResource->setType($type);
     $this->resourceRepository->add($newResource);
     $this->flashMessageContainer->add('<h4 class="alert-heading">Okay!</h4> Your new Resource was created.');
     $this->redirect('list');
 }
 /**
  * action create
  *
  * @param $newAttachment
  * @param Tx_Nxshowroom_Domain_Model_Resource $resource
  * @return void
  */
 public function createAction(Tx_Nxshowroom_Domain_Model_Attachment $newAttachment, Tx_Nxshowroom_Domain_Model_Resource $resource)
 {
     $this->attachmentRepository->add($newAttachment);
     $resource->addAttachment($newAttachment);
     $this->flashMessageContainer->add('Your new Attachment was created.');
     $this->redirect('show', 'Resource', NULL, array('resource' => $resource->getUid()));
 }