NcTestobjController.php
3.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
<?php
namespace Netzcoop\Anctestextension\Controller;
/***
*
* This file is part of the "anc test extension" Extension for TYPO3 CMS.
*
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
*
* (c) 2017
*
***/
/**
* NcTestobjController
*/
class NcTestobjController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionController
{
/**
* ncTestobjRepository
*
* @var \Netzcoop\Anctestextension\Domain\Repository\NcTestobjRepository
* @inject
*/
protected $ncTestobjRepository = null;
/**
* action list
*
* @return void
*/
public function listAction()
{
$ncTestobjs = $this->ncTestobjRepository->findAll();
$this->view->assign('ncTestobjs', $ncTestobjs);
}
/**
* action show
*
* @param \Netzcoop\Anctestextension\Domain\Model\NcTestobj $ncTestobj
* @return void
*/
public function showAction(\Netzcoop\Anctestextension\Domain\Model\NcTestobj $ncTestobj)
{
$this->view->assign('ncTestobj', $ncTestobj);
}
/**
* action new
*
* @return void
*/
public function newAction()
{
}
/**
* action create
*
* @param \Netzcoop\Anctestextension\Domain\Model\NcTestobj $newNcTestobj
* @return void
*/
public function createAction(\Netzcoop\Anctestextension\Domain\Model\NcTestobj $newNcTestobj)
{
$this->addFlashMessage('The object was created. Please be aware that this action is publicly accessible unless you implement an access check. See https://docs.typo3.org/typo3cms/extensions/extension_builder/User/Index.html', '', \TYPO3\CMS\Core\Messaging\AbstractMessage::WARNING);
$this->ncTestobjRepository->add($newNcTestobj);
$this->redirect('list');
}
/**
* action edit
*
* @param \Netzcoop\Anctestextension\Domain\Model\NcTestobj $ncTestobj
* @ignorevalidation $ncTestobj
* @return void
*/
public function editAction(\Netzcoop\Anctestextension\Domain\Model\NcTestobj $ncTestobj)
{
$this->view->assign('ncTestobj', $ncTestobj);
}
/**
* action update
*
* @param \Netzcoop\Anctestextension\Domain\Model\NcTestobj $ncTestobj
* @return void
*/
public function updateAction(\Netzcoop\Anctestextension\Domain\Model\NcTestobj $ncTestobj)
{
$this->addFlashMessage('The object was updated. Please be aware that this action is publicly accessible unless you implement an access check. See https://docs.typo3.org/typo3cms/extensions/extension_builder/User/Index.html', '', \TYPO3\CMS\Core\Messaging\AbstractMessage::WARNING);
$this->ncTestobjRepository->update($ncTestobj);
$this->redirect('list');
}
/**
* action delete
*
* @param \Netzcoop\Anctestextension\Domain\Model\NcTestobj $ncTestobj
* @return void
*/
public function deleteAction(\Netzcoop\Anctestextension\Domain\Model\NcTestobj $ncTestobj)
{
$this->addFlashMessage('The object was deleted. Please be aware that this action is publicly accessible unless you implement an access check. See https://docs.typo3.org/typo3cms/extensions/extension_builder/User/Index.html', '', \TYPO3\CMS\Core\Messaging\AbstractMessage::WARNING);
$this->ncTestobjRepository->remove($ncTestobj);
$this->redirect('list');
}
}