Skip to content

Commit ac32258

Browse files
authored
[TASK] Update codesnippets (#6315)
Releases: main
1 parent 08d8661 commit ac32258

File tree

6 files changed

+20
-10
lines changed

6 files changed

+20
-10
lines changed

Documentation/ApiOverview/Backend/BackendModules/_ModifyDocHeaderComponent.rst.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
2020
$metaInformation = $this->getMetaInformation();
2121
if (is_array($metaInformation)) {
22-
$view->getDocHeaderComponent()->setMetaInformation($metaInformation);
22+
$view->getDocHeaderComponent()->setPageBreadcrumb($metaInformation);
2323
}
2424
}
2525

Documentation/CodeSnippets/Extbase/Controllers/BlogControllerNew.rst.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,17 @@
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(),

Documentation/CodeSnippets/Extbase/Controllers/BlogControllerUpdate.rst.txt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
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
{
@@ -18,8 +20,10 @@
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');

Documentation/CodeSnippets/Extbase/Controllers/ForwardAction.rst.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
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 {

Documentation/CodeSnippets/Extbase/PropertyManager/PropertyMapperInjection.rst.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
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
@@ -22,6 +22,6 @@
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
}

Documentation/CodeSnippets/Extbase/View/HtmlResponse.rst.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,17 @@
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(),

0 commit comments

Comments
 (0)