File tree Expand file tree Collapse file tree 6 files changed +20
-10
lines changed
ApiOverview/Backend/BackendModules Expand file tree Collapse file tree 6 files changed +20
-10
lines changed Original file line number Diff line number Diff line change 1919
2020 $metaInformation = $this->getMetaInformation();
2121 if (is_array($metaInformation)) {
22- $view->getDocHeaderComponent()->setMetaInformation ($metaInformation);
22+ $view->getDocHeaderComponent()->setPageBreadcrumb ($metaInformation);
2323 }
2424 }
2525
Original file line number Diff line number Diff line change 66
77 use Psr\Http\Message\ResponseInterface;
88 use T3docs\BlogExample\Domain\Model\Blog;
9+ use TYPO3\CMS\Extbase\Attribute\IgnoreValidation;
910
1011 class BlogController extends ActionController
1112 {
1213 /**
1314 * Displays a form for creating a new blog
1415 */
15- public function newAction(?Blog $newBlog = null): ResponseInterface
16- {
16+ public function newAction(
17+ #[IgnoreValidation]
18+ ?Blog $newBlog = null,
19+ ): ResponseInterface {
1720 $this->view->assignMultiple([
1821 'newBlog' => $newBlog,
1922 'administrators' => $this->administratorRepository->findAll(),
Original file line number Diff line number Diff line change 66
77 use Psr\Http\Message\ResponseInterface;
88 use T3docs\BlogExample\Domain\Model\Blog;
9+ use T3docs\BlogExample\Domain\Validator\BlogValidator;
910 use T3docs\BlogExample\Exception\NoBlogAdminAccessException;
11+ use TYPO3\CMS\Extbase\Attribute\Validate;
1012
1113 class BlogController extends ActionController
1214 {
1820 *
1921 * @throws NoBlogAdminAccessException
2022 */
21- public function updateAction(Blog $blog): ResponseInterface
22- {
23+ public function updateAction(
24+ #[Validate(validator: BlogValidator::class)]
25+ Blog $blog,
26+ ): ResponseInterface {
2327 $this->checkBlogAdminAccess();
2428 $this->blogRepository->update($blog);
2529 $this->addFlashMessage('updated');
Original file line number Diff line number Diff line change 2727 ->withExtensionName('blog_example')
2828 ->withArguments(['currentPage' => $currentPage]);
2929 }
30- $this->blogPageTitleProvider ->setTitle($blog->getTitle());
30+ $this->recordTitleProvider ->setTitle($blog->getTitle());
3131 if (empty($tag)) {
3232 $posts = $this->postRepository->findBy(['blog' => $blog]);
3333 } else {
Original file line number Diff line number Diff line change 77 use T3docs\BlogExample\Domain\Repository\BlogRepository;
88 use T3docs\BlogExample\Domain\Repository\PersonRepository;
99 use T3docs\BlogExample\Domain\Repository\PostRepository;
10- use T3docs\BlogExample\ PageTitle\BlogPageTitleProvider ;
10+ use TYPO3\CMS\Core\ PageTitle\RecordTitleProvider ;
1111 use TYPO3\CMS\Extbase\Property\PropertyMapper;
1212
1313 class PostController extends ActionController
2222 protected readonly PersonRepository $personRepository,
2323 protected readonly PostRepository $postRepository,
2424 protected readonly PropertyMapper $propertyMapper,
25- protected readonly BlogPageTitleProvider $blogPageTitleProvider ,
25+ protected readonly RecordTitleProvider $recordTitleProvider ,
2626 ) {}
2727 }
Original file line number Diff line number Diff line change 77
88 use Psr\Http\Message\ResponseInterface;
99 use T3docs\BlogExample\Domain\Model\Blog;
10+ use TYPO3\CMS\Extbase\Attribute\IgnoreValidation;
1011
1112 class BlogController extends ActionController
1213 {
1314 /**
1415 * Displays a form for creating a new blog
1516 */
16- public function newAction(?Blog $newBlog = null): ResponseInterface
17- {
17+ public function newAction(
18+ #[IgnoreValidation]
19+ ?Blog $newBlog = null,
20+ ): ResponseInterface {
1821 $this->view->assignMultiple([
1922 'newBlog' => $newBlog,
2023 'administrators' => $this->administratorRepository->findAll(),
You can’t perform that action at this time.
0 commit comments