Skip to content

Commit 55ae9c8

Browse files
committed
[TASK] Add controller and action
and backend related stuff (TCA/FlexForm)
1 parent ef665d1 commit 55ae9c8

File tree

12 files changed

+227
-0
lines changed

12 files changed

+227
-0
lines changed

Diff for: Classes/Controller/ListController.php

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace In2code\Bluesky\Controller;
6+
7+
use Psr\Http\Message\ResponseInterface;
8+
use TYPO3\CMS\Extbase\Mvc\Controller\ActionController;
9+
10+
class ListController extends ActionController
11+
{
12+
public function listAction(): ResponseInterface
13+
{
14+
return $this->htmlResponse();
15+
}
16+
}

Diff for: Configuration/FlexForms/List.xml

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<T3DataStructure>
2+
<meta>
3+
<langDisable>1</langDisable>
4+
</meta>
5+
<sheets>
6+
<main>
7+
<ROOT>
8+
<sheetTitle>Bluesky</sheetTitle>
9+
<type>array</type>
10+
<el>
11+
<settings.account>
12+
<label>LLL:EXT:bluesky/Resources/Private/Language/locallang_db.xlf:plugin.list.flexform.account.label</label>
13+
<config>
14+
<type>input</type>
15+
<placeholder>in2code.de</placeholder>
16+
<eval>trim,required</eval>
17+
</config>
18+
</settings.account>
19+
<settings.limit>
20+
<exclude>1</exclude>
21+
<label>LLL:EXT:bluesky/Resources/Private/Language/locallang_db.xlf:plugin.list.flexform.limit.label</label>
22+
<config>
23+
<type>number</type>
24+
<default>10</default>
25+
</config>
26+
</settings.limit>
27+
</el>
28+
</ROOT>
29+
</main>
30+
</sheets>
31+
</T3DataStructure>

Diff for: Configuration/Services.yaml

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
services:
2+
_defaults:
3+
autowire: true
4+
autoconfigure: true
5+
public: false
6+
7+
In2code\Bluesky\:
8+
resource: '../Classes/*'

Diff for: Configuration/TCA/Overrides/tt_content.php

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
defined('TYPO3') || die();
6+
7+
use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
8+
use TYPO3\CMS\Extbase\Utility\ExtensionUtility;
9+
10+
/**
11+
* Register Plugin
12+
*/
13+
ExtensionUtility::registerPlugin(
14+
'Bluesky',
15+
'List',
16+
'LLL:EXT:bluesky/Resources/Private/Language/locallang_db.xlf:plugin.list.title',
17+
'extension-bluesky',
18+
'plugins',
19+
'LLL:EXT:bluesky/Resources/Private/Language/locallang_db.xlf:plugin.list.description'
20+
);
21+
22+
/**
23+
* Include Flexform
24+
*/
25+
ExtensionManagementUtility::addToAllTCAtypes(
26+
'tt_content',
27+
'--div--;Configuration,pi_flexform,pages,recursive,',
28+
'bluesky_list',
29+
'after:subheader',
30+
);
31+
ExtensionManagementUtility::addPiFlexFormValue(
32+
'*',
33+
'FILE:EXT:bluesky/Configuration/FlexForms/List.xml',
34+
'bluesky_list'
35+
);

Diff for: Resources/Private/Language/de.locallang_db.xlf

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
2+
<xliff version="1.0">
3+
<file source-language="en" target-language="de" datatype="plaintext" original="messages" date="2025-03-05T12:00:00Z" product-name="bluesky">
4+
<header/>
5+
<body>
6+
<trans-unit id="plugin.list.title">
7+
<source>Bluesky feed</source>
8+
<target state="translated">Bluesky Feed</target>
9+
</trans-unit>
10+
<trans-unit id="plugin.list.description">
11+
<source>Show a bluesky feed from a profile</source>
12+
<target state="translated">Zeige einen Bluesky Feed eines Profils</target>
13+
</trans-unit>
14+
<trans-unit id="plugin.list.flexform.account.label">
15+
<source>Account name</source>
16+
<target state="translated">Account Name</target>
17+
</trans-unit>
18+
<trans-unit id="plugin.list.flexform.limit.label">
19+
<source>Limit number of posts</source>
20+
<target state="translated">Anzahl Posts limitieren</target>
21+
</trans-unit>
22+
</body>
23+
</file>
24+
</xliff>

Diff for: Resources/Private/Language/locallang_db.xlf

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
2+
<xliff version="1.0">
3+
<file source-language="en" datatype="plaintext" original="messages" date="2025-03-05T12:00:00Z" product-name="bluesky">
4+
<header/>
5+
<body>
6+
<trans-unit id="plugin.list.title">
7+
<source>Bluesky feed</source>
8+
</trans-unit>
9+
<trans-unit id="plugin.list.description">
10+
<source>Show a bluesky feed from a profile</source>
11+
</trans-unit>
12+
<trans-unit id="plugin.list.flexform.account.label">
13+
<source>Account name</source>
14+
</trans-unit>
15+
<trans-unit id="plugin.list.flexform.limit.label">
16+
<source>Limit number of posts</source>
17+
</trans-unit>
18+
</body>
19+
</file>
20+
</xliff>

Diff for: Resources/Private/Templates/List/List.html

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
HW

Diff for: Resources/Public/Icons/Extension.svg

+3
Loading

Diff for: composer.json

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"name": "in2code/bluesky",
3+
"description": "Show bluesky feed in TYPO3",
4+
"keywords": [
5+
"typo3",
6+
"bluesky"
7+
],
8+
"homepage": "https://github.com/in2code-de/bluesky",
9+
"authors": [
10+
{
11+
"name": "Alex Kellner",
12+
"email": "[email protected]",
13+
"role": "Technical owner",
14+
"homepage": "https://www.in2code.de"
15+
}
16+
],
17+
"type": "typo3-cms-extension",
18+
"license": "GPL-2.0-or-later",
19+
"require": {
20+
"php": ">=8.2.0",
21+
"typo3/cms-core": "^13.4"
22+
},
23+
"replace": {
24+
"typo3-ter/bluesky": "self.version"
25+
},
26+
"autoload": {
27+
"psr-4": {
28+
"In2code\\Bluesky\\": "Classes/"
29+
}
30+
},
31+
"extra": {
32+
"typo3/cms": {
33+
"extension-key": "bluesky"
34+
}
35+
}
36+
}

Diff for: ext_emconf.php

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?php
2+
$EM_CONF[$_EXTKEY] = [
3+
'title' => 'Show bluesky feed in TYPO3',
4+
'category' => 'plugin',
5+
'version' => '1.0.0',
6+
'author' => 'Alex Kellner',
7+
'author_email' => '[email protected]',
8+
'author_company' => 'in2code.de',
9+
'state' => 'stable',
10+
'constraints' => [
11+
'depends' => [
12+
'typo3' => '13.4.0-13.4.99',
13+
],
14+
'conflicts' => [],
15+
'suggests' => [],
16+
],
17+
];

Diff for: ext_localconf.php

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
use In2code\Bluesky\Controller\ListController;
6+
use TYPO3\CMS\Extbase\Utility\ExtensionUtility;
7+
8+
defined('TYPO3') || die();
9+
10+
ExtensionUtility::configurePlugin(
11+
'Bluesky',
12+
'List',
13+
[
14+
ListController::class => 'list'
15+
],
16+
[],
17+
ExtensionUtility::PLUGIN_TYPE_CONTENT_ELEMENT
18+
);

Diff for: ext_tables.php

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
use TYPO3\CMS\Core\Imaging\IconProvider\SvgIconProvider;
6+
use TYPO3\CMS\Core\Imaging\IconRegistry;
7+
use TYPO3\CMS\Core\Utility\GeneralUtility;
8+
9+
defined('TYPO3') || die();
10+
11+
$iconRegistry = GeneralUtility::makeInstance(
12+
IconRegistry::class
13+
);
14+
$iconRegistry->registerIcon(
15+
'extension-bluesky',
16+
SvgIconProvider::class,
17+
['source' => 'EXT:bluesky/Resources/Public/Icons/Extension.svg']
18+
);

0 commit comments

Comments
 (0)