-
Notifications
You must be signed in to change notification settings - Fork 174
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into page-meta-attribute
- Loading branch information
Showing
11 changed files
with
115 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
Documentation/ContentObjects/Extbaseplugin/_CodeSnippets/_MyController.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace MyVendor\MyExtension\Controller; | ||
|
||
use Psr\Http\Message\ResponseInterface; | ||
use TYPO3\CMS\Extbase\Mvc\Controller\ActionController; | ||
use TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer; | ||
|
||
class MyController extends ActionController | ||
{ | ||
public function listAction(): ResponseInterface | ||
{ | ||
/** @var ContentObjectRenderer $contentObject */ | ||
$contentObject = $this->request->getAttribute('currentContentObject'); | ||
$dataFromTypoScript = $contentObject->data; | ||
$someValue = (int)($dataFromTypoScript['someValue'] ?? 0); | ||
$someSetting = $dataFromTypoScript['someSetting'] ?? ''; | ||
// Do something | ||
return $this->htmlResponse(); | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
Documentation/ContentObjects/Extbaseplugin/_CodeSnippets/_SomeTemplate.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<!-- ... --> | ||
<f:cObject | ||
typoscriptObjectPath="lib.myPlugin" | ||
data="{someValue: page.pageRecord.someValue, someSetting: site.someSetting}" | ||
/> |
14 changes: 14 additions & 0 deletions
14
Documentation/ContentObjects/Extbaseplugin/_CodeSnippets/_configurePlugin.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?php | ||
|
||
use MyVendor\MyExtension\Controller\MyController; | ||
use TYPO3\CMS\Extbase\Utility\ExtensionUtility; | ||
|
||
defined('TYPO3') || die('Access denied.'); | ||
|
||
ExtensionUtility::configurePlugin( | ||
'MyExtension', | ||
'MyPlugIn1', | ||
[MyController::class => 'list, show'], | ||
[], | ||
ExtensionUtility::PLUGIN_TYPE_CONTENT_ELEMENT, | ||
); |
6 changes: 6 additions & 0 deletions
6
Documentation/ContentObjects/Extbaseplugin/_CodeSnippets/_libMyPlugin.typoscript
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
lib.myPlugin = EXTBASEPLUGIN | ||
lib.myPlugin { | ||
extensionName = MyExtension | ||
pluginName = MyPlugIn1 | ||
settings.detailPid = 42 | ||
} |
4 changes: 2 additions & 2 deletions
4
Documentation/DataProcessing/_PageContentFetchingProcessor/_Default.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters