Commit 70510dbf authored by Dirk Wildt's avatar Dirk Wildt

0.0.6

parent 08ecef57
0.0.6
19-06-24
Feature
* #t3811: New table ticket
New files:
* Classes
* Controller/TicketController.php
* Domain
* Model/Ticket.php
* Repository/TicketRepository.php
* Configuration/TCA/tx_tile_domain_model_ticket.php
* Resources/Private
* Backend/Templates/Tickets/*
* Language/locallang_csh_tx_tile_domain_model_ticket.xlf
Affected files:
* ext_tables.php
* ext_tables.sql
* Resources/Private/Language
* de.locallang_db.xlf
* locallang_db.xlf
0.0.5
19-05-19
Feature
......
<?php
namespace Netzmacher\Tile\Controller;
/***
*
* This file is part of the "Book a tile!" 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) 2019 Dirk Wildt (Die Netzmacher) <http://wildt@die-netzmacher.de>, Die Netzmacher
*
***/
/**
* TicketController
*/
class TicketController extends AbstractController
{
/**
* action list
*
* @return void
*/
public function listAction()
{
$tickets = $this->ticketRepository->findAll();
$this->view->assign('tickets', $tickets);
}
/**
* action show
*
* @param \Netzmacher\Tile\Domain\Model\Ticket $ticket
* @return void
*/
public function showAction(\Netzmacher\Tile\Domain\Model\Ticket $ticket)
{
$this->view->assign('ticket', $ticket);
}
/**
* action new
*
* @return void
*/
public function newAction()
{
}
/**
* action create
*
* @param \Netzmacher\Tile\Domain\Model\Ticket $newTicket
* @return void
*/
public function createAction(\Netzmacher\Tile\Domain\Model\Ticket $newTicket)
{
$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->ticketRepository->add($newTicket);
$this->redirect('list');
}
/**
* action edit
*
* @param \Netzmacher\Tile\Domain\Model\Ticket $ticket
* @ignorevalidation $ticket
* @return void
*/
public function editAction(\Netzmacher\Tile\Domain\Model\Ticket $ticket)
{
$this->view->assign('ticket', $ticket);
}
/**
* action update
*
* @param \Netzmacher\Tile\Domain\Model\Ticket $ticket
* @return void
*/
public function updateAction(\Netzmacher\Tile\Domain\Model\Ticket $ticket)
{
$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->ticketRepository->update($ticket);
$this->redirect('list');
}
/**
* action delete
*
* @param \Netzmacher\Tile\Domain\Model\Ticket $ticket
* @return void
*/
public function deleteAction(\Netzmacher\Tile\Domain\Model\Ticket $ticket)
{
$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->ticketRepository->remove($ticket);
$this->redirect('list');
}
}
......@@ -188,9 +188,6 @@ class Area extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
/**
* Initializes all ObjectStorage properties
* Do not modify this method!
* It will be rewritten on each save in the extension builder
* You may modify the constructor of this class instead
*
* @return void
*/
......
......@@ -157,9 +157,6 @@ class Category extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
/**
* Initializes all ObjectStorage properties
* Do not modify this method!
* It will be rewritten on each save in the extension builder
* You may modify the constructor of this class instead
*
* @return void
*/
......
......@@ -55,9 +55,6 @@ class Group extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
/**
* Initializes all ObjectStorage properties
* Do not modify this method!
* It will be rewritten on each save in the extension builder
* You may modify the constructor of this class instead
*
* @return void
*/
......
<?php
namespace Netzmacher\Tile\Domain\Model;
/* * *
*
* This file is part of the "Book a tile!" 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) 2019 Dirk Wildt (Die Netzmacher) <http://wildt@die-netzmacher.de>, Die Netzmacher
*
* * */
/**
* Group
*/
class Ticket extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
{
const TABLE_NAME = 'tx_tile_domain_model_ticket';
/**
* title
*
* @var string
* @validate NotEmpty
*/
protected $title = '';
/**
* txTileGroup
*
* @var \Netzmacher\Tile\Domain\Model\Group
*/
protected $txTileGroup = null;
/**
* __construct
*/
public function __construct()
{
//Do not remove the next line: It would break the functionality
$this->initStorageObjects();
}
/**
* Initializes all ObjectStorage properties
*
* @return void
*/
protected function initStorageObjects()
{
$this->txTileGroup = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
}
/**
* Returns the title
*
* @return string $title
*/
public function getTitle()
{
return $this->title;
}
/**
* Sets the title
*
* @param string $title
* @return void
*/
public function setTitle( $title )
{
$this->title = $title;
}
/**
* Returns the txTileGroup
*
* @return \Netzmacher\Tile\Domain\Model\Group $txTileGroup
*/
public function getTxTileGroup()
{
return $this->txTileGroup;
}
/**
* Sets the txTileGroup
*
* @param \Netzmacher\Tile\Domain\Model\Group $txTileGroup
* @return void
*/
public function setTxTileGroup( \Netzmacher\Tile\Domain\Model\Group $txTileGroup )
{
$this->txTileGroup = $txTileGroup;
}
}
<?php
namespace Netzmacher\Tile\Domain\Repository;
/***
*
* This file is part of the "Book a tile!" 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) 2019 Dirk Wildt (Die Netzmacher) <http://wildt@die-netzmacher.de>, Die Netzmacher
*
***/
/**
* The repository for Groups
*/
class TicketRepository extends \TYPO3\CMS\Extbase\Persistence\Repository
{
}
......@@ -149,33 +149,33 @@ return [
'eval' => 'trim,required'
],
],
'colordisabled' => [
'exclude' => true,
'label' => 'LLL:EXT:tile/Resources/Private/Language/locallang_db.xlf:tx_tile_domain_model_category.colordisabled',
'config' => [
'type' => 'input',
'size' => 30,
'eval' => 'trim,required'
],
],
'coloravailable' => [
'exclude' => true,
'label' => 'LLL:EXT:tile/Resources/Private/Language/locallang_db.xlf:tx_tile_domain_model_category.coloravailable',
'config' => [
'type' => 'input',
'size' => 30,
'eval' => 'trim,required'
],
],
'colorselled' => [
'exclude' => true,
'label' => 'LLL:EXT:tile/Resources/Private/Language/locallang_db.xlf:tx_tile_domain_model_category.colorselled',
'config' => [
'type' => 'input',
'size' => 30,
'eval' => 'trim,required'
],
],
// 'colordisabled' => [
// 'exclude' => true,
// 'label' => 'LLL:EXT:tile/Resources/Private/Language/locallang_db.xlf:tx_tile_domain_model_category.colordisabled',
// 'config' => [
// 'type' => 'input',
// 'size' => 30,
// 'eval' => 'trim,required'
// ],
// ],
// 'coloravailable' => [
// 'exclude' => true,
// 'label' => 'LLL:EXT:tile/Resources/Private/Language/locallang_db.xlf:tx_tile_domain_model_category.coloravailable',
// 'config' => [
// 'type' => 'input',
// 'size' => 30,
// 'eval' => 'trim,required'
// ],
// ],
// 'colorselled' => [
// 'exclude' => true,
// 'label' => 'LLL:EXT:tile/Resources/Private/Language/locallang_db.xlf:tx_tile_domain_model_category.colorselled',
// 'config' => [
// 'type' => 'input',
// 'size' => 30,
// 'eval' => 'trim,required'
// ],
// ],
'tx_tile_css' => [
'exclude' => true,
'label' => 'LLL:EXT:tile/Resources/Private/Language/locallang_db.xlf:tx_tile_domain_model_category.tx_tile_css',
......
<?php
$confArr = unserialize( $GLOBALS[ 'TYPO3_CONF_VARS' ][ 'EXT' ][ 'extConf' ][ 'tile' ] );
return [
'ctrl' => [
'title' => 'LLL:EXT:tile/Resources/Private/Language/locallang_db.xlf:tx_tile_domain_model_ticket',
'label' => 'title',
'tstamp' => 'tstamp',
'crdate' => 'crdate',
'cruser_id' => 'cruser_id',
'versioningWS' => true,
'languageField' => 'sys_language_uid',
'transOrigPointerField' => 'l10n_parent',
'transOrigDiffSourceField' => 'l10n_diffsource',
'hideTable' => $confArr[ 'tcaReadonly' ],
'readOnly' => $confArr[ 'tcaReadonly' ],
// 'delete' => 'deleted',
'enablecolumns' => [
// 'disabled' => 'hidden',
// 'starttime' => 'starttime',
// 'endtime' => 'endtime',
],
'searchFields' => 'title',
'iconfile' => 'EXT:tile/Resources/Public/Icons/tx_tile_domain_model_ticket.gif'
],
'interface' => [
'showRecordFieldList' => ''
. 'sys_language_uid, l10n_parent, l10n_diffsource,'
// . 'hidden,'
. 'title, tx_tile_group',
],
'types' => [
'1' => [
'showitem' => ''
. ' promptReadonly, sys_language_uid, l10n_parent, l10n_diffsource, '
// . ' hidden, '
. ' title, tx_tile_group, '
// . '--div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.access,'
// . ' starttime, endtime'
],
],
'columns' => [
'sys_language_uid' => [
'exclude' => true,
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.language',
'config' => [
'type' => 'select',
'renderType' => 'selectSingle',
'special' => 'languages',
'items' => [
[
'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.allLanguages',
-1,
'flags-multiple'
]
],
'default' => 0,
],
],
'l10n_parent' => [
'displayCond' => 'FIELD:sys_language_uid:>:0',
'exclude' => true,
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.l18n_parent',
'config' => [
'type' => 'select',
'renderType' => 'selectSingle',
'default' => 0,
'items' => [
[ '', 0 ],
],
'foreign_table' => 'tx_tile_domain_model_ticket',
'foreign_table_where' => 'AND {#tx_tile_domain_model_ticket}.{#pid}=###CURRENT_PID### AND {#tx_tile_domain_model_ticket}.{#sys_language_uid} IN (-1,0)',
],
],
'l10n_diffsource' => [
'config' => [
'type' => 'passthrough',
],
],
't3ver_label' => [
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.versionLabel',
'config' => [
'type' => 'input',
'size' => 30,
'max' => 255,
],
],
'hidden' => [
'exclude' => true,
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.visible',
'config' => [
'type' => 'check',
'renderType' => 'checkboxToggle',
'items' => [
[
0 => '',
1 => '',
'invertStateDisplay' => true
]
],
],
],
'promptReadonly' => [
'label' => 'LLL:EXT:tile/Resources/Private/Language/TCA/prompt.xlf:readonly.label',
'config' => [
'type' => 'user',
'renderType' => 'Prompt',
'parameters' => [
'prompt' => 'readonly',
],
],
],
'starttime' => [
'exclude' => true,
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.starttime',
'config' => [
'type' => 'input',
'renderType' => 'inputDateTime',
'eval' => 'datetime,int',
'default' => 0,
'behaviour' => [
'allowLanguageSynchronization' => true
]
],
],
'endtime' => [
'exclude' => true,
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.endtime',
'config' => [
'type' => 'input',
'renderType' => 'inputDateTime',
'eval' => 'datetime,int',
'default' => 0,
'range' => [
'upper' => mktime( 0, 0, 0, 1, 1, 2038 )
],
'behaviour' => [
'allowLanguageSynchronization' => true
]
],
],
'title' => [
'exclude' => true,
'label' => 'LLL:EXT:tile/Resources/Private/Language/locallang_db.xlf:tx_tile_domain_model_ticket.title',
'config' => [
'type' => 'input',
'size' => 30,
'eval' => 'trim,required'
],
],
'tx_tile_group' => [
'exclude' => true,
'label' => 'LLL:EXT:tile/Resources/Private/Language/locallang_db.xlf:tx_tile_domain_model_ticket.tx_tile_group',
'config' => [
'type' => 'select',
'renderType' => 'selectSingle',
'foreign_table' => 'tx_tile_domain_model_group',
'minitems' => 0,
'maxitems' => 1,
],
],
],
];
......@@ -30,7 +30,7 @@ plugin {
// templateRootPaths, partialRootPaths, layoutRootPaths
view =
view {
templateRootPaths.0 = EXT:{extension.extensionKey}/Resources/Private/Templates/
templateRootPaths.0 = EXT:tile/Resources/Private/Templates/
templateRootPaths.1 = {$plugin.tx_tile_pi1.view.templateRootPath}
partialRootPaths.0 = EXT:tile/Resources/Private/Partials/
partialRootPaths.1 = {$plugin.tx_tile_pi1.view.partialRootPath}
......
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
<f:layout name="Default" />
This Template is responsible for creating a table of domain objects.
If you modify this template, do not forget to change the overwrite settings
in /Configuration/ExtensionBuilder/settings.yaml:
Resources:
Private:
Templates:
List.html: keep
Otherwise your changes will be overwritten the next time you save the extension in the extension builder
<f:section name="content">
<h1>Listing for Category</h1>
<f:flashMessages />
<table class="tx_tile" >
<tr>
<th><f:translate key="tx_tile_domain_model_category.title" /></th>
<th><f:translate key="tx_tile_domain_model_category.colordisabled" /></th>
<th><f:translate key="tx_tile_domain_model_category.coloravailable" /></th>
<th><f:translate key="tx_tile_domain_model_category.colorselled" /></th>
<th> </th>
<th> </th>
</tr>
<f:for each="{categories}" as="category">
<tr>
<td><f:link.action action="show" arguments="{category : category}"> {category.title}</f:link.action></td>
<td><f:link.action action="show" arguments="{category : category}"> {category.colordisabled}</f:link.action></td>
<td><f:link.action action="show" arguments="{category : category}"> {category.coloravailable}</f:link.action></td>
<td><f:link.action action="show" arguments="{category : category}"> {category.colorselled}</f:link.action></td>
<td><f:link.action action="edit" arguments="{category : category}">Edit</f:link.action></td>
<td><f:link.action action="delete" arguments="{category : category}">Delete</f:link.action></td>
</tr>
</f:for>
</table>
<f:link.action action="new">New Category</f:link.action>
</f:section>
</html>
\ No newline at end of file
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
<f:layout name="Default" />
This Template is responsible for creating a table of domain objects.
If you modify this template, do not forget to change the overwrite settings
in /Configuration/ExtensionBuilder/settings.yaml:
Resources:
Private:
Templates:
List.html: keep
Otherwise your changes will be overwritten the next time you save the extension in the extension builder
<f:section name="content">
<h1>Listing for Group</h1>
<f:flashMessages />
<table class="tx_tile" >
<tr>
<th><f:translate key="tx_tile_domain_model_group.title" /></th>
<th> </th>
<th> </th>
</tr>
<f:for each="{groups}" as="group">
<tr>
<td><f:link.action action="show" arguments="{group : group}"> {group.title}</f:link.action></td>
<td><f:link.action action="edit" arguments="{group : group}">Edit</f:link.action></td>
<td><f:link.action action="delete" arguments="{group : group}">Delete</f:link.action></td>
</tr>
</f:for>
</table>
<f:link.action action="new">New Group</f:link.action>
</f:section>
</html>
\ No newline at end of file
......@@ -27,6 +27,30 @@
<source>Tile</source>
<target>Kachel</target>
</trans-unit>
<trans-unit id="tx_tile_domain_model_category">
<source>Category</source>
<target>Kategorie</target>
</trans-unit>
<trans-unit id="tx_tile_domain_model_category.title">
<source>Title</source>
<target>Name</target>
</trans-unit>
<trans-unit id="tx_tile_domain_model_category.colordisabled">
<source>Color disabled</source>
<target>Farbe nicht verfügbar</target>
</trans-unit>
<trans-unit id="tx_tile_domain_model_category.coloravailable">
<source>Color available</source>
<target>Farbe verfügbar</target>
</trans-unit>
<trans-unit id="tx_tile_domain_model_category.colorselled">
<source>Color selled</source>
<target>Farbe verkauft</target>
</trans-unit>
<trans-unit id="tx_tile_domain_model_category.tx_tile_css">
<source>CSS class</source>
<target>CSS-Klasse</target>
</trans-unit>
<trans-unit id="tx_tile_domain_model_cell">
<source>Tile</source>
<target>Kachel</target>
......@@ -55,50 +79,6 @@
<source>Group</source>
<target>Gruppe</target>
</trans-unit>
<trans-unit id="tx_tile_domain_model_group">
<source>Group</source>
<target>Gruppe</target>
</trans-unit>
<trans-unit id="tx_tile_domain_model_group.title">
<source>Title</source>
<target>Name</target>
</trans-unit>
<trans-unit id="tx_tile_domain_model_group.tx_tile_cell">
<source>Tile</source>
<target>Kachel</target>
</trans-unit>
<trans-unit id="tx_tile_domain_model_group.tx_tile_category">
<source>Category</source>
<target>Kategorie</target>
</trans-unit>
<trans-unit id="tx_tile_domain_model_category">
<source>Category</source>
<target>Kategorie</target>
</trans-unit>
<trans-unit id="tx_tile_domain_model_category.title">
<source>Title</source>
<target>Name</target>
</trans-unit>
<trans-unit id="tx_tile_domain_model_category.colordisabled">
<source>Color disabled</source>
<target>Farbe nicht verfügbar</target>
</trans-unit>
<trans-unit id="tx_tile_domain_model_category.coloravailable">
<source>Color available</source>
<target>Farbe verfügbar</target>
</trans-unit>
<trans-unit id="tx_tile_domain_model_category.colorselled">
<source>Color selled</source>
<target>Farbe verkauft</target>
</trans-unit>
<trans-unit id="tx_tile_domain_model_category.tx_tile_css">
<source>CSS class</source>
<target>CSS-Klasse</target>
</trans-unit>
<trans-unit id="tx_tile_domain_model_category.tx_tile_group">
<source>Group</source>
<target>Gruppe</target>
</trans-unit>
<trans-unit id="tx_tile_domain_model_css">
<source>CSS class</source>
<target>CSS-Klasse</target>
......@@ -119,6 +99,34 @@
<source>Title</source>
<target>Name</target>
</trans-unit>
<trans-unit id="tx_tile_domain_model_group">
<source>Group</source>
<target>Gruppe</target>
</trans-unit>
<trans-unit id="tx_tile_domain_model_group.title">
<source>Title</source>
<target>Name</target>
</trans-unit>